internal systemd function instead of regex for systemd.exitstatus

This commit is contained in:
mc-fucker 2022-02-15 16:51:07 +01:00
parent bb1ce1dbd9
commit a7a44c908b

View file

@ -6,7 +6,7 @@
package = pkgs.zabbix.agent2; package = pkgs.zabbix.agent2;
settings = { settings = {
UserParameter = '' UserParameter = ''
systemd.exitstatus[*],systemctl status "$1" | grep "Main PID: " | grep -Po "(?<=status=)[0-9]{1,3}(?=(/|))" systemd.exitstatus[*],systemctl show --value -p ExecMainStatus "$1"
''; '';
}; };
}; };