2012-08-04 19:53:23 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
prefix=@prefix@
|
2013-01-30 20:29:07 +08:00
|
|
|
pkgdatadir=${prefix}/share/seafile
|
2012-08-04 19:53:23 +08:00
|
|
|
|
2013-01-30 20:29:07 +08:00
|
|
|
export PYTHONPATH=@pythondir@:$PYTHONPATH
|
2012-08-04 19:53:23 +08:00
|
|
|
|
|
|
|
if [ $1 == "start" ]; then
|
2013-01-30 21:18:27 +08:00
|
|
|
if [ -f /tmp/seafile-web.pid ]; then
|
|
|
|
kill -9 `cat /tmp/seafile-web.pid`
|
2012-08-04 19:53:23 +08:00
|
|
|
fi
|
2013-01-30 20:29:07 +08:00
|
|
|
cd ${pkgdatadir}/web
|
2012-12-17 14:08:53 +08:00
|
|
|
@PYTHON@ main.py 127.0.0.1:13420 &
|
2013-01-30 21:18:27 +08:00
|
|
|
echo $! > /tmp/seafile-web.pid
|
2012-08-04 19:53:23 +08:00
|
|
|
elif [ $1 == "stop" ]; then
|
2013-01-30 21:18:27 +08:00
|
|
|
kill -9 `cat /tmp/seafile-web.pid`
|
|
|
|
rm -f /tmp/seafile-web.pid
|
2012-08-04 19:53:23 +08:00
|
|
|
fi
|