summaryrefslogtreecommitdiff
path: root/honk.install
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2021-05-07 19:39:00 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2021-05-07 19:39:00 +0100
commit646fa9c3925e80333e19f6f775f38410cea4efb4 (patch)
treec6ebd4f5f763228ddde6fd31ac6bbec3e7ece0c2 /honk.install
downloadhonk-hg_aur-646fa9c3925e80333e19f6f775f38410cea4efb4.tar.gz
honk-hg_aur-646fa9c3925e80333e19f6f775f38410cea4efb4.zip
Initial commit for honk-hg
Diffstat (limited to 'honk.install')
-rwxr-xr-xhonk.install16
1 files changed, 16 insertions, 0 deletions
diff --git a/honk.install b/honk.install
new file mode 100755
index 0000000..dcb03bb
--- /dev/null
+++ b/honk.install
@@ -0,0 +1,16 @@
+#!/bin/sh
+_BOLD='\033[01m'
+_STYLE_END='\033[0m'
+_HONKDIR="/usr/share/webapps/honk"
+
+post_install() {
+ useradd -r -m -d $_HONKDIR honk
+ chown honk:honk -R "$_HONKDIR"
+ systemctl daemon-reload
+ printf "\n\n${_BOLD}VERY IMPORTANT${_STYLE_END}:\nType:\n\t cd $_HONKDIR && ./honk init\nin a shell to initialize the database, and then you can type 'systemctl start honk' to start the honk server.\n'systemctl status honk' will help you identify problems that might arise.\nThe service launch the binary with the honk user and group.\n\n"
+}
+
+post_remove() {
+ userdel honk
+ rm -rf $_HONKDIR
+}