mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-27 11:01:14 +00:00
34 lines
587 B
Plaintext
34 lines
587 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
|
||
|
PROJDIR="/home/ubuntu/seahub"
|
||
|
PIDFILE="$PROJDIR/mysite.pid"
|
||
|
|
||
|
#kill -HUP `cat -- $PIDFILE`
|
||
|
|
||
|
cd $PROJDIR
|
||
|
|
||
|
if [ -f $PIDFILE ]; then
|
||
|
echo "Killing seahub python processes ..."
|
||
|
PID=`cat -- $PIDFILE`
|
||
|
echo "Parent process: $PID"
|
||
|
echo "Child processes:" `pgrep -P $PID`
|
||
|
|
||
|
kill `cat -- $PIDFILE`
|
||
|
rm -f -- $PIDFILE
|
||
|
|
||
|
sleep 5
|
||
|
fi
|
||
|
|
||
|
echo ""
|
||
|
echo "Starting seahub gunicorn ..."
|
||
|
./start.template
|
||
|
sleep 2
|
||
|
|
||
|
if [ -f $PIDFILE ]; then
|
||
|
echo "Done."
|
||
|
PID=`cat -- $PIDFILE`
|
||
|
echo "New seahub parent process: $PID"
|
||
|
echo "Child processes:" `pgrep -P $PID`
|
||
|
fi
|