From 4456511f89ab7a2e9ca59f78f0c98f05f507b359 Mon Sep 17 00:00:00 2001 From: Nithin Philips Date: Tue, 29 Sep 2020 12:02:18 -0400 Subject: [PATCH 1/3] Add steps to create systemd services --- docs/INSTALL_MANUAL.md | 132 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 128 insertions(+), 4 deletions(-) diff --git a/docs/INSTALL_MANUAL.md b/docs/INSTALL_MANUAL.md index 3c7f7a4..efb4424 100644 --- a/docs/INSTALL_MANUAL.md +++ b/docs/INSTALL_MANUAL.md @@ -71,9 +71,62 @@ tar xvzf scrutiny-web-frontend.tar.gz --strip-components 1 -C . rm -rf scrutiny-web-frontend.tar.gz ``` -### Start Scrutiny Webapp +### Install Scrutiny systemd service -Finally, we start the Scrutiny webapp: +You may install Scrutiny as a systemd service: + +Create user and group for the service: + +``` +groupadd -r scrutiny +useradd -m -d /etc/scrutiny -s /sbin/nologin -r -g scrutiny scrutiny +``` + +Change file permissions: + +``` +chown -R scrutiny\:scrutiny /etc/scrutiny +``` + +Create the service unit file: + +``` +cat > /etc/systemd/system/scrutiny.service < /etc/systemd/system/scrutiny-collector.service < /etc/systemd/system/scrutiny-collector.timer < Date: Tue, 29 Sep 2020 12:02:18 -0400 Subject: [PATCH 2/3] Add steps to create systemd services --- docs/INSTALL_MANUAL.md | 132 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 128 insertions(+), 4 deletions(-) diff --git a/docs/INSTALL_MANUAL.md b/docs/INSTALL_MANUAL.md index 445f707..9cbdbe5 100644 --- a/docs/INSTALL_MANUAL.md +++ b/docs/INSTALL_MANUAL.md @@ -73,9 +73,62 @@ tar xvzf scrutiny-web-frontend.tar.gz --strip-components 1 -C . rm -rf scrutiny-web-frontend.tar.gz ``` -### Start Scrutiny Webapp +### Install Scrutiny systemd service -Finally, we start the Scrutiny webapp: +You may install Scrutiny as a systemd service: + +Create user and group for the service: + +``` +groupadd -r scrutiny +useradd -m -d /etc/scrutiny -s /sbin/nologin -r -g scrutiny scrutiny +``` + +Change file permissions: + +``` +chown -R scrutiny\:scrutiny /etc/scrutiny +``` + +Create the service unit file: + +``` +cat > /etc/systemd/system/scrutiny.service < /etc/systemd/system/scrutiny-collector.service < /etc/systemd/system/scrutiny-collector.timer < Date: Fri, 2 Oct 2020 12:30:06 -0400 Subject: [PATCH 3/3] Change paths from etc to opt --- docs/INSTALL_MANUAL.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/INSTALL_MANUAL.md b/docs/INSTALL_MANUAL.md index 9cbdbe5..9be3307 100644 --- a/docs/INSTALL_MANUAL.md +++ b/docs/INSTALL_MANUAL.md @@ -81,13 +81,13 @@ Create user and group for the service: ``` groupadd -r scrutiny -useradd -m -d /etc/scrutiny -s /sbin/nologin -r -g scrutiny scrutiny +useradd -m -d /opt/scrutiny -s /sbin/nologin -r -g scrutiny scrutiny ``` Change file permissions: ``` -chown -R scrutiny\:scrutiny /etc/scrutiny +chown -R scrutiny\:scrutiny /opt/scrutiny ``` Create the service unit file: @@ -102,7 +102,7 @@ After=network.target Type=idle User=scrutiny Group=scrutiny -ExecStart=/etc/scrutiny/bin/scrutiny-web-linux-amd64 start --config /etc/scrutiny/config/scrutiny.yaml +ExecStart=/opt/scrutiny/bin/scrutiny-web-linux-amd64 start --config /opt/scrutiny/config/scrutiny.yaml TimeoutStartSec=600 TimeoutStopSec=600 @@ -193,7 +193,7 @@ Description=Scrutiny disk health data collector [Service] Type=idle -ExecStart=/etc/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 run --api-endpoint "http://localhost:8080" +ExecStart=/opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 run --api-endpoint "http://localhost:8080" TimeoutStartSec=600 TimeoutStopSec=600 EOF