mirror of https://github.com/Icinga/icinga2.git
parent
e93dd3cf15
commit
2a2da04af6
|
@ -47,7 +47,7 @@ fi
|
|||
|
||||
mkdir -p $ICINGA2_RUN_DIR/icinga2/cmd
|
||||
chown $ICINGA2_USER:$ICINGA2_COMMAND_GROUP $ICINGA2_RUN_DIR/icinga2/cmd
|
||||
if [ $(which restorecon) ]; then
|
||||
if which restorecon >/dev/null 2&>1; then
|
||||
restorecon -R $ICINGA2_RUN_DIR/icinga2/
|
||||
fi
|
||||
chmod 2750 $ICINGA2_RUN_DIR/icinga2/cmd
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
#!/bin/sh
|
||||
# load system specific defines
|
||||
SYSCONFIGFILE=$1
|
||||
if [ -f "$SYSCONFIGFILE" ]; then
|
||||
. $SYSCONFIGFILE
|
||||
else
|
||||
echo "Error: You need to supply the path to the Icinga2 sysconfig file as parameter."
|
||||
if [ ! -f "$SYSCONFIGFILE" ]; then
|
||||
echo "Error: You need to supply the path to the Icinga2 sysconfig file as a parameter."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. $SYSCONFIGFILE
|
||||
|
||||
printf "Validating config files: "
|
||||
|
||||
OUTPUTFILE=`mktemp`
|
||||
if [ $(which chcon) ]; then
|
||||
|
||||
if env chcon >/dev/null 2&>1; then
|
||||
chcon -t icinga2_tmp_t $OUTPUTFILE
|
||||
fi
|
||||
|
||||
|
||||
if ! $DAEMON daemon --validate --color > $OUTPUTFILE; then
|
||||
echo "Failed"
|
||||
|
||||
|
@ -34,11 +34,10 @@ if [ ! -e $ICINGA2_PID_FILE ]; then
|
|||
fi
|
||||
|
||||
pid=`cat $ICINGA2_PID_FILE`
|
||||
if kill -HUP $pid >/dev/null 2>&1; then
|
||||
echo "Done"
|
||||
else
|
||||
if ! kill -HUP $pid >/dev/null 2>&1; then
|
||||
echo "Error: Icinga not running"
|
||||
exit 7
|
||||
fi
|
||||
|
||||
echo "Done"
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue