Make go-sbot.service name configurable
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
notplants 2022-05-20 13:35:37 +02:00
parent 7deaa00d6e
commit 56c142a387
2 changed files with 3 additions and 2 deletions

View File

@ -60,6 +60,7 @@ pub fn get_peach_config_defaults() -> HashMap<String, String> {
("ADMIN_PASSWORD_HASH", "47"),
("TEMPORARY_PASSWORD_HASH", ""),
("GO_SBOT_DATADIR", "/home/peach/.ssb-go"),
("GO_SBOT_SERVICE", "go-sbot.service"),
("PEACH_CONFIGDIR", "/var/lib/peachcloud"),
("PEACH_HOMEDIR", "/home/peach"),
("PEACH_WEBDIR", "/usr/share/peach-web"),

View File

@ -67,7 +67,7 @@ impl SbotStatus {
// because non-privileged users are able to run systemctl show
let info_output = Command::new("systemctl")
.arg("show")
.arg("go-sbot.service")
.arg(get_config_value("GO_SBOT_SERVICE")?)
.arg("--no-page")
.output()?;
@ -89,7 +89,7 @@ impl SbotStatus {
// because non-privileged users are able to run systemctl status
let status_output = Command::new("systemctl")
.arg("status")
.arg("go-sbot.service")
.arg(get_config_value("GO_SBOT_SERVICE")?)
.output()?;
let service_status = str::from_utf8(&status_output.stdout)?;