summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2016-07-02 13:26:22 -0300
committerdequis <dx@dxzone.com.ar>2016-07-02 13:26:22 -0300
commit22389197540458551d546f256361a7206a1235c5 (patch)
treeb262fc8e6488cf80996610bde7870017711e4e1e /install
downloadjabberd2-22389197540458551d546f256361a7206a1235c5.tar.xz
Initial import from aur-mirror (version 2.3.3)
Diffstat (limited to 'install')
-rw-r--r--install21
1 files changed, 21 insertions, 0 deletions
diff --git a/install b/install
new file mode 100644
index 0000000..e4771c6
--- /dev/null
+++ b/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
+}