diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2013-02-15 12:58:31 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2013-02-15 12:58:31 -0500 |
commit | 3b2e0940912977aadb95b4b19f7f46c18b6ae93e (patch) | |
tree | 10ac82b7c5b8e6af2722376600214cc9ce74e558 /pcr/spectrum/spectrum.install | |
parent | 20e3130d771b0f74af0ef0fc0b36c5fa184e7e8f (diff) | |
download | abslibre-3b2e0940912977aadb95b4b19f7f46c18b6ae93e.tar.gz abslibre-3b2e0940912977aadb95b4b19f7f46c18b6ae93e.tar.bz2 abslibre-3b2e0940912977aadb95b4b19f7f46c18b6ae93e.zip |
Adding poco, libpurple-minimal and spectrum to pcr
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 +} |