summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-08 11:17:37 -0500
committerJeff Carr <[email protected]>2024-10-08 11:17:37 -0500
commit2b1eed1409f598000edc26de189261e0d70881a6 (patch)
tree3ceb864a1d3c8482208d373d34ca1c1d1af3c2e6
parentb283823ffe0258cec4237ef82859fb6cd071ac2d (diff)
attempt debian postinst script
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--Makefile4
-rwxr-xr-xbuild4
-rwxr-xr-xpostinst5
3 files changed, 13 insertions, 0 deletions
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 .