summaryrefslogtreecommitdiff
path: root/honk.install
blob: e130f054125637b5b6d67f6320a79de54f566062 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
_BOLD='\033[01m'
_STYLE_END='\033[0m'
_HONKDIR="/usr/share/honk"

post_install() {
    systemctl daemon-reload
    mandb -q > /dev/null
    useradd -r -m -d $_HONKDIR honk
    chown honk:honk -R "$_HONKDIR"
    printf "\n\n${_BOLD}VERY IMPORTANT${_STYLE_END}:\nType:\n\tsu -l honk -c \"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.\n\n"
}

post_remove() {
    userdel honk
    rm -rf $_HONKDIR
}