diff --git a/comile.sh b/comile.sh index 881505a..90d1b8a 100644 --- a/comile.sh +++ b/comile.sh @@ -1 +1 @@ -gcc main.c config.c -lcurl -Wall -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -ldbus-1 +gcc main.c config.c -lcurl -Wall -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -ldbus-1 -o systemd-gotify.bin diff --git a/config b/config index edda6f7..f10dfb2 100644 --- a/config +++ b/config @@ -1,2 +1,3 @@ /org/freedesktop/systemd1/unit/NetworkManager_2dwait_2donline_2eservice /org/freedesktop/systemd1/unit/NetworkManager_2eservice +/org/freedesktop/systemd1/unit/httpd_2eservice diff --git a/main.c b/main.c index b5e1b41..1f1b789 100644 --- a/main.c +++ b/main.c @@ -238,7 +238,7 @@ int checkState(char *ServiceName,char *result,Service *service) gotify_message("https://5ccppi.org:4433",ServiceName,"is not running"); printf("!!system unit died!! Alert gotify server!\n"); } - else if(strcmp(result,"active")==0) + else if(strcmp(result,"active")==0 || strcmp(result,"running")==0) { if(service->alerted == true) {