diff options
author | Justin Nuß <nuss.justin@gmail.com> | 2014-07-26 11:23:58 +0200 |
---|---|---|
committer | Justin Nuß <nuss.justin@gmail.com> | 2014-07-26 11:23:58 +0200 |
commit | 91480f3791f266369c343c539f8eeec245fa969a (patch) | |
tree | a03ad6062fe4b546367cdb6f9921399458d97441 /scripts/gogs_supervisord.sh | |
parent | 835e85b5ce9921ffd4d50b90b706e02685167331 (diff) | |
parent | 35c75f06a0a4f321021984830d760e67ca0ef8e5 (diff) |
Merge branch 'dev' of https://github.com/gogits/Gogs into issue/281
Conflicts:
modules/base/tool.go
Diffstat (limited to 'scripts/gogs_supervisord.sh')
-rwxr-xr-x | scripts/gogs_supervisord.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/gogs_supervisord.sh b/scripts/gogs_supervisord.sh new file mode 100755 index 00000000..3038407e --- /dev/null +++ b/scripts/gogs_supervisord.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +echo 'plase remember to modify the command path in etc/supervisord.conf(line 23)' + +PID="/tmp/supervisord.pid" +CONF="etc/supervisord.conf" + +LOGDIR="log" +if [ ! -d $LOGDIR ]; then + mkdir $LOGDIR +fi + +stop() { + if [ -f $PID ]; then + kill `cat -- $PID` + rm -f -- $PID + echo "stopped" + fi +} + +start() { + echo "starting" + if [ ! -f $PID ]; then + supervisord -c $CONF + echo "started" + fi +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" +esac
\ No newline at end of file |