Handle shutdown, persist session
This commit is contained in:
parent
7b3c78386a
commit
a71fea4daa
@ -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"
|
Loading…
Reference in New Issue
Block a user