fork and disown start script
This commit is contained in:
parent
80711e1278
commit
651d4a953e
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
|
(
|
||||||
PIDS=""
|
PIDS=""
|
||||||
for i in $(ps -awx | grep -i [c]loudbot | sed "s/^\s*//" | cut -d" " -f1); do
|
for i in $(ps -awx | grep -i [c]loudbot | sed "s/^\s*//" | cut -d" " -f1); do
|
||||||
if [ $i != $$ ]; then
|
if [ $i != $$ ]; then
|
||||||
|
@ -18,4 +19,5 @@ do
|
||||||
sudo -u cloudbot ./cloudbot.py 2>&1 | logger -s -t $(basename $0)
|
sudo -u cloudbot ./cloudbot.py 2>&1 | logger -s -t $(basename $0)
|
||||||
sleep 10
|
sleep 10
|
||||||
done
|
done
|
||||||
|
) &
|
||||||
|
disown $!
|
||||||
|
|
Reference in New Issue