pull/109/head
midoks 3 years ago
parent 1183dc7820
commit 2f9758998d
  1. 4
      plugins/gogs/init.d/gogs.service.tpl
  2. 5
      plugins/gogs/install.sh

@ -1,8 +1,6 @@
[Unit]
Description=Gogs
After=syslog.target
After=network.target
After=mariadb.service mysqld.service postgresql.service memcached.service redis.service
[Service]
# Modify these two values and uncomment them if you have
@ -18,7 +16,7 @@ WorkingDirectory={$SERVER_PATH}/gogs
ExecStart={$SERVER_PATH}/gogs/gogs web
ExecReload=/bin/kill -USR2 $MAINPID
Restart=always
Environment=USER=git HOME=/usr/bin/git
Environment=USER=root HOME=/root
# Some distributions may not support these hardening directives. If you cannot start the service due
# to an unknown option, comment out the ones not supported by your version of systemd.

@ -47,8 +47,11 @@ Install_gogs()
cd $serverPath/source/gogs && unzip -o $file -d gogs_${version}
mv $serverPath/source/gogs/gogs_${version}/gogs/ $serverPath/gogs
echo $version > $serverPath/gogs/version.pl
if [ -d $serverPath/gogs ];then
echo $version > $serverPath/gogs/version.pl
fi
# if id -u gogs > /dev/null 2>&1; then
# echo "gogs user exists"
# else

Loading…
Cancel
Save