summaryrefslogtreecommitdiff
path: root/pcr/ganglia/ganglia.install
diff options
context:
space:
mode:
authorMárcio Alexandre Silva Delgado <coadde@lavabit.com>2013-06-20 03:30:35 -0300
committerMárcio Alexandre Silva Delgado <coadde@lavabit.com>2013-06-20 03:30:35 -0300
commit44f0880cda2259246e136be7f9e0471b61734430 (patch)
tree1259287aaa47a75f38613d81362fcc06b14962e8 /pcr/ganglia/ganglia.install
parentb68d98eae18eddc4ab673140ce38ec8ca8849d1c (diff)
downloadabslibre-44f0880cda2259246e136be7f9e0471b61734430.tar.gz
abslibre-44f0880cda2259246e136be7f9e0471b61734430.tar.bz2
abslibre-44f0880cda2259246e136be7f9e0471b61734430.zip
ganglia: fixing package
Diffstat (limited to 'pcr/ganglia/ganglia.install')
-rw-r--r--pcr/ganglia/ganglia.install16
1 files changed, 7 insertions, 9 deletions
diff --git a/pcr/ganglia/ganglia.install b/pcr/ganglia/ganglia.install
index 60b7f102d..814a993bc 100644
--- a/pcr/ganglia/ganglia.install
+++ b/pcr/ganglia/ganglia.install
@@ -7,26 +7,24 @@ post_install() {
# arg 2: the old package version
post_upgrade() {
if [ "`vercmp $2 3.4.0`" -lt 0 ]; then
- echo "WARNING: The ganglia package has been split. If you use the" \
- "web frontend, you'll need to install the ganglia-web package as well."
+ echo 'WARNING: The ganglia package has been split. If you use the' \
+ 'web frontend, you'll need to install the ganglia-web package as well.'
fi
id ganglia >& /dev/null
if [ $? -ne 0 ]; then
- echo "Adding ganglia system group and user..."
- groupadd -r ganglia
- useradd -r -d /var/lib/ganglia -g ganglia -s /bin/false ganglia
+ echo 'Adding ganglia system group and user...'
+ groupadd -r ganglia && useradd -r -d /var/lib/ganglia -g ganglia -s /bin/false ganglia
# Lock the account to prevent logging in
passwd -l ganglia &> /dev/null
fi
- install -d -o ganglia -g ganglia /var/lib/ganglia
- install -d -o ganglia -g ganglia /var/lib/ganglia/rrds
+ install -d -o ganglia -g ganglia /var/lib/ganglia && install -d -o ganglia -g ganglia /var/lib/ganglia/rrds
}
# arg 1: the old package version
post_remove() {
- echo "Removing ganglia system group and user..."
+ echo 'Removing ganglia system group and user...'
userdel ganglia
- echo "NOTE: Please remove /var/lib/ganglia manually if it is no longer required."
+ echo 'NOTE: Please remove /var/lib/ganglia manually if it is no longer required.'
}
# vim:set ts=2 sw=2 et: