summaryrefslogtreecommitdiffstats
path: root/scripts/init
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-07-25 00:48:42 +0800
committerUnknwon <u@gogs.io>2015-07-25 00:48:42 +0800
commit70d44e9565e372c73d4f0f42273d4899e8e07f75 (patch)
tree769df61da1e8732270787b2e3098f7bacc1a7dcd /scripts/init
parentbab811c530debd30f8e9036e1f513fa76393310b (diff)
parent57651060ce356504c873bef0fd6a36d9f2acf141 (diff)
downloadgitea-70d44e9565e372c73d4f0f42273d4899e8e07f75.tar.gz
gitea-70d44e9565e372c73d4f0f42273d4899e8e07f75.zip
Merge branch 'master' of github.com:gogits/gogs into develop
Diffstat (limited to 'scripts/init')
-rw-r--r--scripts/init/debian/gogs6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/init/debian/gogs b/scripts/init/debian/gogs
index 13e8b8aa5b..b0b52286fc 100644
--- a/scripts/init/debian/gogs
+++ b/scripts/init/debian/gogs
@@ -49,10 +49,12 @@ do_start()
# 1 if daemon was already running
# 2 if daemon could not be started
sh -c "start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\
- --exec $DAEMON -- $DAEMON_ARGS --test > /dev/null \\
+ --test --chdir $WORKINGDIR --chuid $USER \\
+ --exec $DAEMON -- $DAEMON_ARGS > /dev/null \\
|| return 1"
sh -c "start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\
- --background --exec /bin/su -- - $USER -c \"cd \\\"$WORKINGDIR\\\" && $DAEMON -- $DAEMON_ARGS\" \\
+ --background --chdir $WORKINGDIR --chuid $USER \\
+ --exec $DAEMON -- $DAEMON_ARGS \\
|| return 2"
}