seafile/seafile-web.in

19 lines
426 B
Plaintext
Raw Normal View History

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