Handle shutdown, persist session

This commit is contained in:
unknown 2016-05-06 08:59:58 +01:00
parent 7b3c78386a
commit a71fea4daa

View File

@ -1,4 +1,14 @@
#!/bin/bash #!/bin/bash
umask 0002
function handle_signal {
PID=$!
echo "received signal. PID is ${PID}"
kill -s SIGHUP $PID
}
trap "handle_signal" SIGINT SIGTERM SIGHUP
echo "starting Nadeko"
cd /root/NadekoBot cd /root/NadekoBot
mono NadekoBot.exe mono NadekoBot.exe & wait
echo "stopping Nadeko"