mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
add neutrino restart to webif
Signed-off-by: GetAway <get-away@t-online.de>
This commit is contained in:
32
autorun.sh
32
autorun.sh
@@ -1,19 +1,29 @@
|
||||
export LD_LIBRARY_PATH=/var/lib
|
||||
export PATH=${PATH}:/var/bin:/var/plugins
|
||||
|
||||
echo "### Starting NEUTRINO ###"
|
||||
# Simple Neutrino start script
|
||||
|
||||
# Neutrino's exit codes
|
||||
ERROR=-1
|
||||
NORMAL=0
|
||||
SHUTDOWN=1
|
||||
REBOOT=2
|
||||
RESTART=3
|
||||
|
||||
echo "Starting Neutrino"
|
||||
|
||||
cd /tmp
|
||||
/bin/neutrino > /dev/null 2> /dev/null
|
||||
/bin/neutrino >/dev/null 2>&1; RET=$?
|
||||
sync
|
||||
|
||||
/bin/sync
|
||||
/bin/sync
|
||||
echo "Neutrino exited with exit code $RET"
|
||||
|
||||
if [ -e /tmp/.reboot ] ; then
|
||||
/bin/dt -t"Rebooting..."
|
||||
/sbin/reboot -f
|
||||
else
|
||||
/bin/dt -t"Panic..."
|
||||
sleep 5
|
||||
/sbin/reboot -f
|
||||
if [ $RET -eq $NORMAL ]; then
|
||||
# do nothing
|
||||
elif [ $RET -eq $SHUTDOWN ]; then
|
||||
poweroff
|
||||
elif [ $RET -eq $REBOOT ]; then
|
||||
reboot
|
||||
else # $RET -eq $ERROR
|
||||
reboot -f
|
||||
fi
|
||||
|
Reference in New Issue
Block a user