Commit 722fb6e1 authored by Seblu's avatar Seblu
Browse files

checkservices: Check libraries update too

Use map file instead of exe to detected filesystem upgrades of binaries.
parent e9aa760c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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