From a215c21356039488b9dffdee8898b4e036476214 Mon Sep 17 00:00:00 2001 From: Avi Date: Sun, 29 Oct 2017 11:35:48 -0500 Subject: [PATCH] New instructions/readme --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b6ab47..a60afc3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,47 @@ # update_ombi -Ombi (tidusjar/Ombi) update script for systemd +Ombi (tidusjar/Ombi) update script for Systemd (Ubuntu based distros) + +**Create the Ombi update script** + + wget https://raw.githubusercontent.com/Unimatrix0/update_ombi/master/update_ombi.sh + +> ### Note: +> This script assumes your systemd service is named **ombi**. If this is not the case, set the ***ombiservicename*** variable at the top of the script. +> The script attempts to automatically detect the required variables by parsing the service file. +> It assumes the service file is named ***ombiservicename*.service** in the default directory (/etc/systemd/system/). +> If the service file can't be found, or if the variables can't be parsed from the service file, it assumes they are the defaults of +> * Installation Dir: **/opt/Ombi** +> * User: **ombi** +> * Group: **nogroup** +> The script also logs to /var/log/ombiupdater.log by default. Make sure that the user running the script has write access to this file. +> You can override these defaults by setting the variables in the **Default variables** section at the top. + +Edit the script file to set variables as needed. + + nano update_ombi.sh + +Press Ctrl+X then y to save (assuming you're using nano). + +Make it executable +``` +chmod +x ~/update_ombi.sh +``` + +When an update is available for Ombi simply run +``` +sudo ./update_ombi.sh +``` + +If you do not plan to run the script as a user with full sudo privileges, you can restrict access for the user with the following: +Edit the sudoers file to give restricted access to the scrupt user +``` +sudo visudo +``` + +Near the bottom of the file, add: +``` +ombi ALL=NOPASSWD: /bin/systemctl stop ombi.service, /bin/systemctl start ombi.service +``` + +> ### Note: +> This assumes you're running the script as **ombi** and that the systemd service is named **ombi**. \ No newline at end of file