diff options
author | root <root@rshg054.dnsready.net> | 2013-02-16 00:07:09 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-02-16 00:07:09 -0800 |
commit | 4a4f6be8604aa35bdc81ae29d86b07dc8aea0c5c (patch) | |
tree | 41f9694a761d6e5637f15f9f9241e5b84cd8897b /pcr/spectrum/spectrum.install | |
parent | 067830244f6b16cb094a59e5ca8fa262bd66a2ec (diff) |
Sat Feb 16 00:07:08 PST 2013
Diffstat (limited to 'pcr/spectrum/spectrum.install')
-rw-r--r-- | pcr/spectrum/spectrum.install | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pcr/spectrum/spectrum.install b/pcr/spectrum/spectrum.install new file mode 100644 index 000000000..d3e0449fc --- /dev/null +++ b/pcr/spectrum/spectrum.install @@ -0,0 +1,45 @@ +# 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 + +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) + + first=true + for path in ${paths[@]}; do + if [ -d $path ]; then + if $first; then + first=false + echo "==> Leftover Paths:" + fi + echo "==> $path" + fi + done +} |