mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
Origin commit data
------------------
Commit: a88019dc69
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-12-07 (Thu, 07 Dec 2017)
Origin message was:
------------------
- autorun.sh: align to neutrino's exit codes
32 lines
453 B
Bash
Executable File
32 lines
453 B
Bash
Executable File
#!/bin/sh
|
|
|
|
export PATH=${PATH}:/var/bin:/var/plugins
|
|
|
|
# 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
|
|
dt -t"Shutdown ..."
|
|
poweroff
|
|
elif [ $RET -eq $REBOOT ]; then
|
|
dt -t"Reboot ..."
|
|
reboot
|
|
else
|
|
dt -t"Panic ..."
|
|
sleep 5
|
|
reboot -f
|
|
fi
|