Tidying
This commit is contained in:
parent
77795c542f
commit
cc875c00fe
|
@ -123,13 +123,10 @@ function mesh_avahi {
|
|||
function keep_avahi_running {
|
||||
WATCHDOG_SCRIPT_NAME="keepon"
|
||||
|
||||
if [ ! -f "/usr/bin/$WATCHDOG_SCRIPT_NAME" ]; then
|
||||
{ echo '#!/bin/bash';
|
||||
echo 'LOGFILE=/var/log/keepon.log';
|
||||
echo "CURRENT_DATE=\$(date)"; } > "/usr/bin/$WATCHDOG_SCRIPT_NAME"
|
||||
if grep -q "avahi daemon" "/usr/bin/$WATCHDOG_SCRIPT_NAME"; then
|
||||
return
|
||||
fi
|
||||
|
||||
if ! grep -q "avahi daemon" "/usr/bin/$WATCHDOG_SCRIPT_NAME"; then
|
||||
{ echo '';
|
||||
echo '# keep avahi daemon running';
|
||||
echo "AVAHI_RUNNING=\$(systemctl is-active avahi-daemon >/dev/null 2>&1 && echo Running)";
|
||||
|
@ -140,7 +137,6 @@ function keep_avahi_running {
|
|||
echo 'fi';
|
||||
echo '# End of avahi'; } >> "/usr/bin/$WATCHDOG_SCRIPT_NAME"
|
||||
chmod +x "/usr/bin/$WATCHDOG_SCRIPT_NAME"
|
||||
fi
|
||||
}
|
||||
|
||||
function install_avahi {
|
||||
|
|
Loading…
Reference in New Issue