mirror of https://github.com/Icinga/icinga2.git
prepare-dirs: Ensure to always set proper run directory permissions
refs #6328
This commit is contained in:
parent
eb3956f6ef
commit
2dafcfa8a9
|
@ -20,11 +20,12 @@ getent group $ICINGA2_COMMAND_GROUP >/dev/null 2>&1 || (echo "Icinga command gro
|
||||||
if [ ! -e "$ICINGA2_RUN_DIR"/icinga2 ]; then
|
if [ ! -e "$ICINGA2_RUN_DIR"/icinga2 ]; then
|
||||||
mkdir "$ICINGA2_RUN_DIR"/icinga2
|
mkdir "$ICINGA2_RUN_DIR"/icinga2
|
||||||
mkdir "$ICINGA2_RUN_DIR"/icinga2/cmd
|
mkdir "$ICINGA2_RUN_DIR"/icinga2/cmd
|
||||||
chmod 755 "$ICINGA2_RUN_DIR"/icinga2
|
|
||||||
chmod 2750 "$ICINGA2_RUN_DIR"/icinga2/cmd
|
|
||||||
chown -R $ICINGA2_USER:$ICINGA2_COMMAND_GROUP "$ICINGA2_RUN_DIR"/icinga2
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chmod 755 "$ICINGA2_RUN_DIR"/icinga2
|
||||||
|
chmod 2750 "$ICINGA2_RUN_DIR"/icinga2/cmd
|
||||||
|
chown -R $ICINGA2_USER:$ICINGA2_COMMAND_GROUP "$ICINGA2_RUN_DIR"/icinga2
|
||||||
|
|
||||||
test -e "$ICINGA2_LOG_DIR" || install -m 750 -o $ICINGA2_USER -g $ICINGA2_COMMAND_GROUP -d "$ICINGA2_LOG_DIR"
|
test -e "$ICINGA2_LOG_DIR" || install -m 750 -o $ICINGA2_USER -g $ICINGA2_COMMAND_GROUP -d "$ICINGA2_LOG_DIR"
|
||||||
|
|
||||||
if type restorecon >/dev/null 2>&1; then
|
if type restorecon >/dev/null 2>&1; then
|
||||||
|
|
Loading…
Reference in New Issue