diff options
author | Erich Eckner <git@eckner.net> | 2018-09-01 14:22:38 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-01 14:22:38 +0200 |
commit | cc73d3e8967e5b8feb03a4ddd8777bf2c95d0dfb (patch) | |
tree | 6915b416bb728d525c1e7e188b27eb2ffe029d61 /jabberd2/install | |
parent | e25fd9151227d65f5a7053f9181779d5b991154a (diff) | |
download | archlinuxewe-cc73d3e8967e5b8feb03a4ddd8777bf2c95d0dfb.tar.xz |
jabberd2 neu
Diffstat (limited to 'jabberd2/install')
-rw-r--r-- | jabberd2/install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/jabberd2/install b/jabberd2/install new file mode 100644 index 000000000..e4771c681 --- /dev/null +++ b/jabberd2/install @@ -0,0 +1,21 @@ +post_install() { + getent group jabber &>/dev/null || groupadd -r jabber >/dev/null + getent passwd jabber &>/dev/null || useradd -r -g jabber -d /etc/jabberd -s /bin/false -c jabber jabber >/dev/null + mkdir -p /var/lib/jabberd/{db,log,pid} + [ -f /var/lib/jabberd/db/sqlite.db ] || sqlite3 /var/lib/jabberd/db/sqlite.db < /usr/share/jabberd/db-setup.sqlite + chown -R jabber:jabber /var/lib/jabberd + chown -R root:jabber /etc/jabberd + cat <<EOF +==> Customize the configuration files in /etc/jabberd/. +==> For details, see: https://github.com/jabberd2/jabberd2/wiki/InstallGuide +EOF +} + +pre_remove() { + systemctl stop jabberd.service +} + +post_remove() { + getent passwd jabber &>/dev/null && userdel jabber >/dev/null + getent group jabber &>/dev/null && groupdel jabber >/dev/null +} |