commit e0e257fcb1aa39408b97541b901d9d0bf9ae75ce
parent 973289bd9e7d15650425d2cf02a87b71fc7ce405
Author: Friedel Schon <[email protected]>
Date: Sat, 29 Apr 2023 22:57:31 +0200
fixing state typo
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/start.c b/src/start.c
@@ -83,6 +83,7 @@ static void set_user() {
}
void service_run(service_t* s) {
+ printf("old state: %d\n", s->state);
char path_buf[PATH_MAX];
struct stat estat;
@@ -160,7 +161,7 @@ void service_start(service_t* s, bool* changed) {
struct stat estat;
if (snprintf(path_buf, PATH_MAX, "%s/%s/setup", service_dir, s->name) && stat(path_buf, &estat) == 0 && estat.st_mode & S_IXUSR) {
- s->state = STATE_FINISHING;
+ s->state = STATE_SETUP;
if ((s->pid = fork()) == -1) {
print_error("cannot fork process");
} else if (s->pid == 0) {