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: 822993d333
Author: TangoCash <eric@loxat.de>
Date: 2021-09-17 (Fri, 17 Sep 2021)
29 lines
403 B
Bash
Executable File
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
|