diff --git a/amd/rc.amd b/amd/rc.amd index fc1a2601ff..7f6736f8ac 100644 --- a/amd/rc.amd +++ b/amd/rc.amd @@ -35,7 +35,8 @@ rcService amd enable yes || exit 0 rcService amd active no && exit 0 amd_signal TERM - sleep 2 + sleep 5 + rm -f $amd_pidfile 2>/dev/null || true %restart -u @l_susr@ rcService amd enable yes || exit 0 @@ -44,9 +45,8 @@ %reload -u @l_susr@ rcService amd enable yes || exit 0 - if [ -f @l_prefix@/var/amd/amd.pid ]; then - kill -HUP `cat @l_prefix@/var/amd/amd.pid` - fi + rcService amd active no && exit 0 + amd_signal HUP %daily -u @l_susr@ rcService amd enable yes || exit 0 @@ -56,6 +56,6 @@ -n ${amd_log_numfiles} -s ${amd_log_minsize} -d \ -z ${amd_log_complevel} -o @l_musr@ -g @l_mgrp@ -m 644 \ -P "$amd_log_prolog" \ - -E "$amd_log_epilog" \ + -E "$amd_log_epilog && rc amd restart" \ @l_prefix@/var/amd/amd.log