From 2b1eed1409f598000edc26de189261e0d70881a6 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 8 Oct 2024 11:17:37 -0500 Subject: [PATCH] attempt debian postinst script Signed-off-by: Jeff Carr --- Makefile | 4 ++++ build | 4 ++++ postinst | 5 +++++ 3 files changed, 13 insertions(+) create mode 100755 postinst diff --git a/Makefile b/Makefile index 33c308d..510d5e9 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,10 @@ log: @#systemctl status gowebd.service @journalctl -f -xeu gowebd.service +enable: + su -c "systemctl enable gowebd.service" + + start: su -c "systemctl start gowebd.service" diff --git a/build b/build index cbfa3e5..bb50f19 100755 --- a/build +++ b/build @@ -8,3 +8,7 @@ cp gowebd.service files/lib/systemd/system/ mkdir -p files/etc/gowebd/ cp Caddyfile.go.wit.com files/etc/gowebd/ cp resources/repomap files/etc/gowebd/ + +# share dir +mkdir -p files/usr/share/gowebd/ +cp resources/repomap files/usr/share/gowebd/go.wit.com diff --git a/postinst b/postinst new file mode 100755 index 0000000..b0f6fd0 --- /dev/null +++ b/postinst @@ -0,0 +1,5 @@ +#!/bin/sh +set -e + +cd /etc/gowebd/ +ln -s /usr/share/gowebd/go.wit.com .