aboutsummaryrefslogtreecommitdiff
path: root/scripts/init
diff options
context:
space:
mode:
authorDon Bowman <don.waterloo@gmail.com>2015-08-12 21:10:00 +0000
committerDon Bowman <don.waterloo@gmail.com>2015-08-12 21:10:00 +0000
commit1cb46ede1acf4f8527e64fcae7e92672cad764b2 (patch)
treefabb54ee5f040be2a4ee5c95f87cb3e9fbf7bdea /scripts/init
parent9e6bd31d76aa6d6495a2144466af78773f34d07c (diff)
parentaede5cdb04fdbf74d9c602062fdece9f408e90f4 (diff)
Merge branch 'master' of https://github.com/gogits/gogs
Conflicts: routers/repo/download.go
Diffstat (limited to 'scripts/init')
-rw-r--r--scripts/init/debian/gogs6
-rw-r--r--scripts/init/freebsd/gogs2
2 files changed, 5 insertions, 3 deletions
diff --git a/scripts/init/debian/gogs b/scripts/init/debian/gogs
index 13e8b8aa..b0b52286 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"
}
diff --git a/scripts/init/freebsd/gogs b/scripts/init/freebsd/gogs
index df13ee0d..e1d3bdee 100644
--- a/scripts/init/freebsd/gogs
+++ b/scripts/init/freebsd/gogs
@@ -21,7 +21,7 @@ load_rc_config $name
: ${gogs_enable:="NO"}
: ${gogs_directory:="/home/git"}
-command="${gogs_directory}/scripts/start.sh"
+command="${gogs_directory}/gogs web"
pidfile="${gogs_directory}/${name}.pid"