1
0
mirror of https://github.com/DigitalDevices/octonet.git synced 2023-10-10 11:36:52 +00:00
2015-08-05 18:52:25 +02:00

30 lines
640 B
Bash
Executable File

#!/bin/sh
case "$1" in
start)
if [ -e /config/static.ip ]; then
/etc/init.d/S99octo stopoctoserve
. /config/static.ip
ifconfig eth0 $IP $NETMASK
route add default gw $GATEWAY
/etc/init.d/S99octo startoctoserve
else
udhcpc -s /etc/network/udhcpc.script -b -T 4 -A 300
fi
export LUA_PATH="/var/channels/?.lua;;"
httpd -h /var/www -c /etc/httpd.conf
;;
stop)
killall udhcpc
killall zcip
killall httpd
;;
restart|reload)
"$0" stop
"$0" start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac