Files
recycled-ni-neutrino/autorun.sh
TangoCash e41d736930 add neutrino restart to webif
Origin commit data
------------------
Commit: 822993d333
Author: TangoCash <eric@loxat.de>
Date: 2021-09-17 (Fri, 17 Sep 2021)
2021-09-17 23:20:40 +02:00

29 lines
403 B
Bash
Executable File

#!/bin/sh
# 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>&1; RET=$?
sync
echo "Neutrino exited with exit code $RET"
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