summarylogtreecommitdiffstats
path: root/gitea.install
blob: a0dc0f8c03c4c209155ed1c12e117a31eb7249ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
post_install() {
  if ! getent group gitea >/dev/null; then
    groupadd --system gitea
  fi
  if ! getent passwd gitea >/dev/null; then
    useradd --system -c 'Gitea' -g gitea -m -d /home/gitea -s /bin/bash gitea
  fi
  chown -R gitea:gitea /var/log/gitea
  chown -R gitea:gitea /var/lib/gitea
  systemctl daemon-reload
  echo ":: Configure gitea in /var/lib/gitea/custom/conf/app.ini"
}

post_upgrade(){
  post_install $1
  echo ":: Consider restarting gitea.service"
}