Fix configuration path in the i2endfeature script.

This commit is contained in:
Gunnar Beutner 2013-09-27 11:22:18 +02:00
parent 09f0986cdb
commit 71e416a23b
1 changed files with 6 additions and 6 deletions

View File

@ -27,7 +27,7 @@ if [ -z "$1" ]; then
echo echo
echo -n "Available feature: " echo -n "Available feature: "
for file in $ICINGA2CONFDIR/mods-available/*.conf; do for file in $ICINGA2CONFDIR/features-available/*.conf; do
echo -n $(basename -- $file .conf) echo -n $(basename -- $file .conf)
done done
@ -38,27 +38,27 @@ fi
FEATURE=$1 FEATURE=$1
if [ ! -e $ICINGA2CONFDIR/mods-available/$FEATURE.conf ]; then if [ ! -e $ICINGA2CONFDIR/features-available/$FEATURE.conf ]; then
echo "The feature '$FEATURE' does not exist." echo "The feature '$FEATURE' does not exist."
exit 1 exit 1
fi fi
if [ "$TOOL" = "i2enfeature" ]; then if [ "$TOOL" = "i2enfeature" ]; then
if [ -e $ICINGA2CONFDIR/mods-enabled/$FEATURE.conf ]; then if [ -e $ICINGA2CONFDIR/features-enabled/$FEATURE.conf ]; then
echo "The feature '$FEATURE' is already enabled." echo "The feature '$FEATURE' is already enabled."
exit 0 exit 0
fi fi
ln -s ../mods-available/$FEATURE.conf $ICINGA2CONFDIR/mods-enabled/ ln -s ../features-available/$FEATURE.conf $ICINGA2CONFDIR/features-enabled/
echo "Module '$FEATURE' was enabled." echo "Module '$FEATURE' was enabled."
elif [ "$TOOL" = "i2disfeature" ]; then elif [ "$TOOL" = "i2disfeature" ]; then
if [ ! -e $ICINGA2CONFDIR/mods-enabled/$FEATURE.conf ]; then if [ ! -e $ICINGA2CONFDIR/features-enabled/$FEATURE.conf ]; then
echo "The feature '$FEATURE' is already disabled." echo "The feature '$FEATURE' is already disabled."
exit 0 exit 0
fi fi
rm -f $ICINGA2CONFDIR/mods-enabled/$FEATURE.conf rm -f $ICINGA2CONFDIR/features-enabled/$FEATURE.conf
echo "Module '$FEATURE' was disabled." echo "Module '$FEATURE' was disabled."
fi fi