From 8d4a10329fe1438d0762cb473ebba1e3f1417494 Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Wed, 21 May 2025 22:54:15 -0400 Subject: [PATCH] don't expose deb --- postinst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 postinst diff --git a/postinst b/postinst new file mode 100755 index 0000000..341f665 --- /dev/null +++ b/postinst @@ -0,0 +1,16 @@ +# only if we're root + +if [ "$(id -u)" != "0" ]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + +BINARY_PATH=${BASE}/usr/local/bin/gitea +SYSTEMD_PATH=${BASE}/etc/systemd/system +CONFIG_PATH=${BASE}/etc/gitea +DATA_PATH=${BASE}/var/lib/gitea + +echo chown -R git:git "$DATA_PATH/" +echo chmod -R 750 "$DATA_PATH/" +echo chown root:git "$CONFIG_PATH" +echo chmod 770 "$CONFIG_PATH" \ No newline at end of file