From 79bbaa8539c4165ff9516cdae89c02362697f341 Mon Sep 17 00:00:00 2001 From: Miquel Lionel Date: Sun, 24 Jan 2021 01:47:01 +0100 Subject: initial commit --- honk.install | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 honk.install (limited to 'honk.install') diff --git a/honk.install b/honk.install new file mode 100755 index 0000000..5cb9d27 --- /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 noboby user and group.\n\n" +} + +post_remove() { + userdel honk + rm -rf $_HONKDIR +} -- cgit v1.2.3-70-g09d2