grep -q "^Compile time options.*[[:space:]]DBus[[:space:]]" \
; then
# Sanity - check that dnsmasq and dbus are running
- if kill -0 $(cat "${dbuspid}") \
- && kill -0 $(cat /var/run/dnsmasq.pid); then
+ if kill -0 $(cat "${dbuspid}") 2>/dev/null \
+ && kill -0 $(cat /var/run/dnsmasq.pid) 2>/dev/null; then
DBUS=yes
NEWCONF="${NEWCONF}\n# Domain specific servers will be sent over dbus\nenable-dbus\n"
fi
# If restarting check if service is running or not if we can
if [ "x${ACTION}" = "xrestart" ]; then
if [ -s /var/run/"${SERVICE}".pid ]; then
- kill -0 $(cat /var/run/"${SERVICE}".pid)
+ kill -0 $(cat /var/run/"${SERVICE}".pid) 2>/dev/null
elif [ -s /var/run/"${SERVICE}"/"${SERVICE}".pid ]; then
- kill -0 $(cat /var/run/"${SERVICE}".pid)
+ kill -0 $(cat /var/run/"${SERVICE}".pid) 2>/dev/null
elif [ -s /var/run/"${SERVICE}"/pid ]; then
- kill -0 $(cat /var/run/"${SERVICE}"/pid)
+ kill -0 $(cat /var/run/"${SERVICE}"/pid) 2>/dev/null
else
false
fi