Last active
August 29, 2015 14:01
-
-
Save vuolter/f985d51b03232c56b4b2 to your computer and use it in GitHub Desktop.
Tomato init.autorun
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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