diff options
author | Lauris BH <lauris@nix.lv> | 2018-06-05 05:02:04 +0300 |
---|---|---|
committer | techknowlogick <techknowlogick@users.noreply.github.com> | 2018-06-04 22:02:04 -0400 |
commit | 1aee261aae74881f65a1152f6fa57bc160adaa16 (patch) | |
tree | 6c329fb4a43fe7d39f56ef30ac44ddb81600a29c /contrib/init/debian | |
parent | 6400d8a3cba41d1435fa0fbe0b5b060062f41e1c (diff) | |
download | gitea-1aee261aae74881f65a1152f6fa57bc160adaa16.tar.gz gitea-1aee261aae74881f65a1152f6fa57bc160adaa16.zip |
More detailed documentation on how to set up from binary (#4121)
* More detailed documentation on how to set up from binary
Also change recommended file locations
Diffstat (limited to 'contrib/init/debian')
-rw-r--r-- | contrib/init/debian/gitea | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/contrib/init/debian/gitea b/contrib/init/debian/gitea index 1a371ba4a4..b7911f106e 100644 --- a/contrib/init/debian/gitea +++ b/contrib/init/debian/gitea @@ -14,17 +14,20 @@ # Do NOT "set -e" # PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="Git with a cup of tea" +PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin +DESC="Gitea - Git with a cup of tea" NAME=gitea SERVICEVERBOSE=yes PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME -WORKINGDIR=/home/git/gitea -DAEMON=$WORKINGDIR/$NAME -DAEMON_ARGS="web" +WORKINGDIR=/var/lib/$NAME +DAEMON=/usr/local/bin/$NAME +DAEMON_ARGS="web -c /etc/$NAME/app.ini" USER=git -USERBIND="setcap cap_net_bind_service=+ep" +USERBIND="" +# If you want to bind Gitea to a port below 1024 uncomment +# the line below +#USERBIND="setcap cap_net_bind_service=+ep" STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/1/KILL/5}" # Read configuration variable file if it is present @@ -36,7 +39,7 @@ STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/1/KILL/5}" do_start() { $USERBIND $DAEMON - sh -c "USER=$USER start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\ + sh -c "USER=$USER HOME=/home/$USER GITEA_WORK_DIR=$WORKINGDIR start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\ --background --chdir $WORKINGDIR --chuid $USER \\ --exec $DAEMON -- $DAEMON_ARGS" } |