2024-09-05 18:31:51 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#ifndef __MK_SERVICE_H__
|
|
|
|
#define __MK_SERVICE_H__
|
|
|
|
|
2024-09-07 08:42:09 +00:00
|
|
|
#include <stdbool.h>
|
2024-09-07 12:44:18 +00:00
|
|
|
#include <pwd.h>
|
2024-09-07 08:42:09 +00:00
|
|
|
|
2024-09-05 18:31:51 +00:00
|
|
|
struct mk_service {
|
2024-09-07 08:42:09 +00:00
|
|
|
char* name;
|
2024-09-06 09:55:53 +00:00
|
|
|
char* description;
|
2024-09-05 18:31:51 +00:00
|
|
|
char* exec;
|
|
|
|
char* pidfile;
|
2024-09-07 08:42:09 +00:00
|
|
|
char* stop;
|
|
|
|
bool stopped;
|
2024-09-07 12:44:18 +00:00
|
|
|
uid_t uid;
|
|
|
|
gid_t gid;
|
2024-09-05 18:31:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void mk_service_scan(void);
|
2024-09-07 08:42:09 +00:00
|
|
|
int mk_start_service(const char* name);
|
|
|
|
int mk_stop_service(const char* name);
|
|
|
|
void mk_start_services(void);
|
2024-09-07 09:55:12 +00:00
|
|
|
void mk_resurrect_services(void);
|
2024-09-05 18:31:51 +00:00
|
|
|
|
|
|
|
#endif
|