postinst 343 B

1234567891011121314151617
  1. #!/bin/sh
  2. case $1 in
  3. configure)
  4. :
  5. addgroup --system git
  6. adduser --system --home /var/lib/gogs --ingroup git --shell /bin/bash git
  7. chown git.git /opt/gogs/custom/conf
  8. chown git.git /opt/gogs/data
  9. chown git.git /opt/gogs/log
  10. chown git.git /var/lib/gogs
  11. update-rc.d gogs start 2 3 4 5
  12. /etc/init.d/gogs start
  13. ;;
  14. esac