11 lines
316 B
Bash
Executable File
11 lines
316 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ! -e /etc/cron.d/checkdnsmasq ]; then
|
|
echo "* * * * * root /root/tareo-scripts/server/checkdnsmasq.sh" > /etc/cron.d/checkdnsmasq
|
|
fi
|
|
|
|
if [ "$(service dnsmasq status | tail -n 1 | grep -q "(running)"; echo $?)" != "0" ]; then
|
|
echo "dnsmasq not running, restart now"
|
|
service dnsmasq restart
|
|
fi
|