Files
recycled-ni-neutrino/autorun.sh
vanhofen 08fdd3a598 autorun.sh: small changes to run on all platforms
Origin commit data
------------------
Branch: ni/coolstream
Commit: 92ff8c9636
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-08-03 (Sat, 03 Aug 2019)

Origin message was:
------------------
- autorun.sh: small changes to run on all platforms

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
2019-08-03 00:44:33 +02:00

28 lines
393 B
Bash
Executable File

#!/bin/sh
# Simple Neutrino start script
# Neutrino's exit codes
ERROR=-1
NORMAL=0
SHUTDOWN=1
REBOOT=2
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