eibgrad
Part of the Furniture
Ok let's see. So I would have:
Code:#!/bin/sh SCRIPTS_DIR='/jffs/scripts' SCRIPT="$SCRIPTS_DIR/init2-start" mkdir -p $SCRIPTS_DIR if [ -f $SCRIPT ]; then echo "error: $SCRIPT already exists; requires manual installation" exit 1 fi cat << "EOF" > $SCRIPT #!/bin/sh set -x # uncomment/comment to enable/disable debug mode ( CLIENT_ID='1' while sleep 60; do if [ "$(nvram get vpn_client${CLIENT_ID}_state)" != "0" ]; then if ! ps | grep -q [v]pnclient${CLIENT_ID}; then service restart_vpnclient${CLIENT_ID} echo "vpnclient${CLIENT_ID} restarted" fi fi done ) 2>&1 | logger -t $(basename $0)[$$] & EOF chmod +x $SCRIPT
Then in my init-start script:
Code:#!/bin/sh [ -x /jffs/dnscrypt/manager ] && /jffs/dnscrypt/manager init-start cru a amtm_RebootScheduler "0 5 * * * service reboot" # Added by amtm /jffs/scripts/init2-start
Does that look right?
This looks correct.