From 758fbb88c90ebc3dd49d93d19a6506c757745ea5 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 8 Dec 2016 22:50:03 +0100 Subject: [PATCH] systemd default file --- bin/install-systemd.sh | 7 ++++++- {defaults => default}/gnt-monitor | 0 systemd/gnt-monitor.service | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) rename {defaults => default}/gnt-monitor (100%) diff --git a/bin/install-systemd.sh b/bin/install-systemd.sh index d79b9ae..4eecab8 100755 --- a/bin/install-systemd.sh +++ b/bin/install-systemd.sh @@ -1,10 +1,15 @@ #!/bin/sh -xe sudo cp gnt-monitor /etc/ganeti/ sudo gnt-cluster copyfile /etc/ganeti/gnt-monitor + sudo cp systemd/gnt-monitor.service /etc/systemd/system/ sudo gnt-cluster copyfile /etc/systemd/system/gnt-monitor.service + +test -e /etc/default/gnt-monitor || cp -v default/gnt-monitor /etc/default/ && echo "# modify config here" +sudo gnt-cluster copyfile /etc/default/gnt-monitor + sudo gnt-cluster command systemctl daemon-reload sudo gnt-cluster command systemctl enable gnt-monitor -sudo gnt-cluster command killall gnt-monitor +#sudo gnt-cluster command killall gnt-monitor sudo gnt-cluster command systemctl start gnt-monitor sudo gnt-cluster command systemctl status gnt-monitor diff --git a/defaults/gnt-monitor b/default/gnt-monitor similarity index 100% rename from defaults/gnt-monitor rename to default/gnt-monitor diff --git a/systemd/gnt-monitor.service b/systemd/gnt-monitor.service index fe5a3ce..1a882e6 100644 --- a/systemd/gnt-monitor.service +++ b/systemd/gnt-monitor.service @@ -2,6 +2,7 @@ Description=Ganeti monitor to InfluxDB [Service] +EnvironmentFile=-/etc/default/gnt-monitor #Type=simple ExecStart=/etc/ganeti/gnt-monitor Restart=always -- 2.20.1