CommandLine: add option --systemd

This way, MPD can reliably detect whether it was started as systemd
service, which is better than checking sd_booted(), which only checks
whether systemd manages all services, but still MPD could be started
manually.
This commit is contained in:
Max Kellermann
2021-11-05 08:48:19 +01:00
parent be3eca39e8
commit ce77b148d9
4 changed files with 20 additions and 2 deletions

@@ -25,6 +25,11 @@ struct ConfigData;
struct options {
bool kill = false;
bool daemon = true;
#ifdef __linux__
bool systemd = false;
#endif
bool log_stderr = false;
bool verbose = false;
};