pull/109/head
midoks 3 years ago
parent e6682ff46a
commit cf0748a026
  1. 6
      plugins/gogs/init.d/gogs.service.tpl
  2. 8
      plugins/gogs/install.sh

@ -10,13 +10,13 @@ After=network.target
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
Type=simple
User=root
Group=root
User=git
Group=git
WorkingDirectory={$SERVER_PATH}/gogs
ExecStart={$SERVER_PATH}/gogs/gogs web
ExecReload=/bin/kill -USR2 $MAINPID
Restart=always
Environment=USER=root HOME=/root
Environment=USER=git HOME=/home/git
# 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.

@ -35,6 +35,14 @@ Install_gogs()
version=$1
os=`getOs`
if id git &> /dev/null ;then
echo "git uid is `id -u git`"
echo "git shell is `grep "^git:" /etc/passwd |cut -d':' -f7 `"
else
groupadd git
useradd -g git git
fi
if [ "darwin" == "$os" ];then
file=gogs_${version}_darwin_amd64.zip
else

Loading…
Cancel
Save