From b94ac17a29f5acd18825f2a59e76e622330223c8 Mon Sep 17 00:00:00 2001 From: Valerio Bellizzomi <55827668+selroc@users.noreply.github.com> Date: Mon, 20 Apr 2020 06:33:39 +0200 Subject: [PATCH 1/3] Create ganglia-alert.service Systemd file for starting ganglia-alert. --- ganglia-alert/ganglia-alert.service | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ganglia-alert/ganglia-alert.service diff --git a/ganglia-alert/ganglia-alert.service b/ganglia-alert/ganglia-alert.service new file mode 100644 index 0000000..96c1d3d --- /dev/null +++ b/ganglia-alert/ganglia-alert.service @@ -0,0 +1,12 @@ +[Unit] +Description=Ganglia Alert Service + +[Service] +Type=simple +PIDFile=/var/run/ganglia-alert.pid +ExecStart=/home/sel/ganglia-alert -d -c /home/sel/ganglia_config.txt +Restart=always + +[Install] +WantedBy=multi-user.target +Alias=ganglia-alert.service From 40e18cd122eccc06c702c9eaaf3d2ca8bb79ccae Mon Sep 17 00:00:00 2001 From: Valerio Bellizzomi <55827668+selroc@users.noreply.github.com> Date: Mon, 20 Apr 2020 06:36:08 +0200 Subject: [PATCH 2/3] Change to generic user This is a generic user directory, change to your own needs. --- ganglia-alert/ganglia-alert.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ganglia-alert/ganglia-alert.service b/ganglia-alert/ganglia-alert.service index 96c1d3d..e8e043c 100644 --- a/ganglia-alert/ganglia-alert.service +++ b/ganglia-alert/ganglia-alert.service @@ -4,7 +4,7 @@ Description=Ganglia Alert Service [Service] Type=simple PIDFile=/var/run/ganglia-alert.pid -ExecStart=/home/sel/ganglia-alert -d -c /home/sel/ganglia_config.txt +ExecStart=/home/user/ganglia-alert -d -c /home/user/ganglia_config.txt Restart=always [Install] From 3120b162e918ce6ff1e2de868a585b8f463e3724 Mon Sep 17 00:00:00 2001 From: Valerio Bellizzomi <55827668+selroc@users.noreply.github.com> Date: Tue, 27 Jul 2021 18:22:59 +0200 Subject: [PATCH 3/3] Adaptation for new OS versions The PID files are no longer in /var/run but in /run --- ganglia-alert/ganglia-alert.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ganglia-alert/ganglia-alert.service b/ganglia-alert/ganglia-alert.service index e8e043c..8e9f4bb 100644 --- a/ganglia-alert/ganglia-alert.service +++ b/ganglia-alert/ganglia-alert.service @@ -3,7 +3,7 @@ Description=Ganglia Alert Service [Service] Type=simple -PIDFile=/var/run/ganglia-alert.pid +PIDFile=/run/ganglia-alert.pid ExecStart=/home/user/ganglia-alert -d -c /home/user/ganglia_config.txt Restart=always