Loading checkservices +2 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,8 @@ services=($(systemctl -t service --full|grep \.service|grep running|sed -rn 's/^ for svc in "${services[@]}"; do pid=$(systemctl show "$svc"|sed -nr 's/^MainPID=(.*)/\1/p') if readlink "/proc/$pid/exe"|grep -q '(deleted)'; then deleted=$(grep '(deleted)' "/proc/$pid/maps") if [[ -n $deleted ]]; then echo systemctl restart "$svc" [[ $systemd_cmd ]] && systemctl "$systemd_cmd" "$svc" fi Loading Loading
checkservices +2 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,8 @@ services=($(systemctl -t service --full|grep \.service|grep running|sed -rn 's/^ for svc in "${services[@]}"; do pid=$(systemctl show "$svc"|sed -nr 's/^MainPID=(.*)/\1/p') if readlink "/proc/$pid/exe"|grep -q '(deleted)'; then deleted=$(grep '(deleted)' "/proc/$pid/maps") if [[ -n $deleted ]]; then echo systemctl restart "$svc" [[ $systemd_cmd ]] && systemctl "$systemd_cmd" "$svc" fi Loading