[SOLVED] crontab @reboot command in LE

  • I need to run iptables-restore at boot.

    I've tried setting up crontab with:

    Code
    @reboot /usr/sbin/iptables-restore /storage/fwrules.v4

    which didn't work, although '/usr/sbin/iptables-restore /storage/fwrules.v4' in the terminal works as intended.

    I also tried running this as a simple, executable shell script

    Bash
    #!/bin/bash
    /usr/sbin/iptables-restore /storage/fwrules.v4

    which works - when run from terminal. But not when called @reboot via crontab.

    Which leads me to wonder if @reboot is functional in LE (7) - and how I can accomplish restoring iptables rules on boot?

    Thanks in advance, guys and gals.

    Edited once, last by fxfxfx (March 15, 2017 at 1:29 PM).