From 81032934c4772882edab999be7380999e488322a Mon Sep 17 00:00:00 2001 From: Cody Cook Date: Sun, 10 Sep 2017 19:40:34 -0700 Subject: [PATCH] Add new file --- rr4360psu_install.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 rr4360psu_install.sh diff --git a/rr4360psu_install.sh b/rr4360psu_install.sh new file mode 100644 index 0000000..cd8bce8 --- /dev/null +++ b/rr4360psu_install.sh @@ -0,0 +1,22 @@ +#!/bin/bash +get_service="http://ntgr.support/scripts/readynas_os_6/rr4360psu.service" +get_script="http://ntgr.support/scripts/readynas_os_6/rr4360psu.sh" +get_timer="http://ntgr.support/scripts/readynas_os_6/rr4360psu.timer" +script="/etc/frontview/support/rr4360psu.sh" + +echo "This is the installer for the RR4360 PSU reporting Offline issue." +echo "It installs files in their appropriate locations and then schedules a run at the top of every hour." +echo "Installing systemd components. " +wget -q "$get_script" -O "$script" +chmod +x "$script" +wget -q "$get_service" -O "/etc/systemd/system/rr4360psu.service" +wget -q "$get_timer" -O "/etc/systemd/system/rr4360psu.timer" +echo "Enabling the systemd timer." +systemctl daemon-reload +systemctl enable rr4360psu.timer +systemctl start rr4360psu.timer +echo "Done" +echo "Since this is freshly installed, running for the first time, then removing the installer." +$script +rm "$0" +echo "Removed the installer and exiting the installation procedure. Cya!" \ No newline at end of file