22 lines
No EOL
993 B
Bash
22 lines
No EOL
993 B
Bash
#!/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!" |