summaryrefslogtreecommitdiff
path: root/social/spectrum/spectrum.install
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-10-23 04:57:38 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-10-23 04:57:38 -0300
commitdb83c17ba25c263db80a7999254a255b14ef0e37 (patch)
tree8825488946334cc194a8490ad7944218fe3896a9 /social/spectrum/spectrum.install
parent128fec48de2a334c7af257ce0efe3315e5055ba6 (diff)
downloadabslibre-db83c17ba25c263db80a7999254a255b14ef0e37.tar.gz
abslibre-db83c17ba25c263db80a7999254a255b14ef0e37.tar.bz2
abslibre-db83c17ba25c263db80a7999254a255b14ef0e37.zip
social/{asterisk,dropbear,openswan,poco,sipwitch,spectrum,ucommon}
Diffstat (limited to 'social/spectrum/spectrum.install')
-rw-r--r--social/spectrum/spectrum.install47
1 files changed, 47 insertions, 0 deletions
diff --git a/social/spectrum/spectrum.install b/social/spectrum/spectrum.install
new file mode 100644
index 000000000..738fc5bbe
--- /dev/null
+++ b/social/spectrum/spectrum.install
@@ -0,0 +1,47 @@
+# arg 1: the new package version
+post_install() {
+ if [ -z "`grep '^spectrum:' /etc/group`" ]; then
+ groupadd -g 417 spectrum
+ fi
+ if [ -z "`grep '^spectrum:' /etc/passwd`" ]; then
+ useradd -u 417 -d /etc/spectrum -g spectrum -s /bin/false spectrum
+ fi
+
+ chown spectrum:spectrum var/lib/spectrum
+ chown spectrum:spectrum var/log/spectrum
+ chown spectrum:spectrum var/run/spectrum
+
+cat << EOF
+
+==> Documentation: http://spectrum.im/
+
+==> You must now customize the configuration file located in /etc/spectrum/. Copy and reconfigure for each seperate protocol.
+
+EOF
+
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+post_remove() {
+ userdel spectrum
+
+ paths=(/etc/spectrum /var/lib/spectrum /var/log/spectrum
+ /var/run/spectrum)
+
+ first=true
+ for path in ${paths[@]}; do
+ if [ -d $path ]; then
+ if $first; then
+ first=false
+ echo "==> Leftover Paths:"
+ fi
+ echo "==> $path"
+ fi
+ done
+}