Hello,
On 12.12.16 08:15, Antoine Beaupré wrote:
Control: tags -1 +patch
Thanks for the patch, it looks good and reasonable!
On 12.12.16 15:11, Matus UHLAR - fantomas wrote:
you're welcome...
looking at it, the "--check" part could be in an "if" clause:
if ${DAEMON} --config=${CONFIG} --check
then
log_end_msg 6 # program is not configured
exit 6
fi
another issue raised up: the "check" fails if the pid directory does not
exist.
So, creating pid directory should go to the check_config() function
(it's called from "start"):
check_config () {
echo "Checking smokeping configuration file syntax..."
# Check whether the configuration file is available
if [ ! -r "$CONFIG" ] && [ "$MODE" = "master" ]
then
log_progress_msg "($CONFIG does not exist)"
log_end_msg 6 # program is not configured
exit 6
fi
if [ ! -d /var/run/smokeping ]; then
mkdir /var/run/smokeping
chown ${DAEMON_USER}.root /var/run/smokeping
chmod 0755 /var/run/smokeping
fi
${DAEMON} --config=${CONFIG} --check || exit 6
}
--
Matus UHLAR - fantomas, [email protected] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
(R)etry, (A)bort, (C)ancer