Skip to content

Instantly share code, notes, and snippets.

@vuolter
Last active August 29, 2015 14:01
Show Gist options
  • Save vuolter/f985d51b03232c56b4b2 to your computer and use it in GitHub Desktop.
Save vuolter/f985d51b03232c56b4b2 to your computer and use it in GitHub Desktop.
Tomato init.autorun
#!/bin/sh
#
# init.autorun v0.3 - Another Tomato init.autorun
# @author: Walter Purcaro <[email protected]>
#
###############################################################################
sleep 300
# Load init daemons
INITDIR='/opt/etc/init.d'
if [ -d "$INITDIR" ]
then
for file in "$INITDIR"/S*
do
[ -x "$file" ] && "$file" start
done
fi
# Load custom scripts
SCRIPTDIR='/opt/scripts'
if [ -d "$SCRIPTDIR" -a -r "$SCRIPTDIR/init" ]
then
while read line
do $line
done < "$SCRIPTDIR/init"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment