summaryrefslogtreecommitdiff
path: root/community-testing/prosody/prosody.install
diff options
context:
space:
mode:
Diffstat (limited to 'community-testing/prosody/prosody.install')
-rw-r--r--community-testing/prosody/prosody.install35
1 files changed, 35 insertions, 0 deletions
diff --git a/community-testing/prosody/prosody.install b/community-testing/prosody/prosody.install
new file mode 100644
index 000000000..f935e3d63
--- /dev/null
+++ b/community-testing/prosody/prosody.install
@@ -0,0 +1,35 @@
+post_install() {
+ if [ -z "`grep '^prosody:' /etc/group`" ]; then
+ groupadd -g 412 prosody
+ fi
+ if [ -z "`grep '^prosody:' /etc/passwd`" ]; then
+ useradd -u 412 -d /var/lib/prosody -g prosody -s /bin/false prosody
+ fi
+
+ chown prosody:prosody var/lib/prosody
+ chown prosody:prosody var/log/prosody
+
+ echo ">> Documentation: http://wiki.archlinux.org/index.php/Prosody"
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ userdel prosody
+
+ paths=(/etc/prosody /var/lib/prosody /var/log/prosody
+ /var/log/old/prosody)
+
+ first=true
+ for path in ${paths[@]}; do
+ if [ -d $path ]; then
+ if $first; then
+ first=false
+ echo "==> Leftover Paths:"
+ fi
+ echo "==> $path"
+ fi
+ done
+}