1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 11:01:14 +00:00
seahub/bin/restart.template

34 lines
587 B
Plaintext
Raw Normal View History

2018-12-06 06:02:56 +00:00
#!/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