diff options
| author | crystal <crystal@noreply.codeberg.org> | 2023-02-06 03:29:43 -0700 |
|---|---|---|
| committer | crystal <crystal@noreply.codeberg.org> | 2023-02-06 03:29:43 -0700 |
| commit | 514499661e8a567e26b8281e0f505c8601ff2edf (patch) | |
| tree | 4c8b0c7dcfaff81efd503d7d190a18b9caadbf49 /deb/debian/forgejo.postinst | |
initial commit
Diffstat (limited to 'deb/debian/forgejo.postinst')
| -rw-r--r-- | deb/debian/forgejo.postinst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/deb/debian/forgejo.postinst b/deb/debian/forgejo.postinst new file mode 100644 index 0000000..2b830ad --- /dev/null +++ b/deb/debian/forgejo.postinst @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +case "$1" in + configure) + [ -f "/etc/default/forgejo" ] && . /etc/default/forgejo + [ -z "$FORGEJO_HOME" ] && FORGEJO_HOME=/var/lib/forgejo + [ -z "$FORGEJO_USER" ] && FORGEJO_USER=forgejo + [ -z "$FORGEJO_NAME" ] && FORGEJO_NAME="Forgejo: Beyond coding. We forge." + [ -z "$FORGEJO_GROUP" ] && FORGEJO_GROUP=forgejo + chown $FORGEJO_USER:$FORGEJO_GROUP /etc/forgejo/app.ini + systemctl daemon-reload || true + systemctl restart forgejo || true + systemctl enable forgejo || true + ;; +esac |
