summarylogtreecommitdiffstats
path: root/sabnzbd.install
diff options
context:
space:
mode:
authorDonald Webster2020-05-06 14:04:17 -0700
committerDonald Webster2020-07-19 11:35:45 -0700
commita287502ea2b3809f8ab0c23ea3917e8563f3ef9f (patch)
tree1b0d4669067d1a7a04c00563f335b82161a2fde4 /sabnzbd.install
parentb110556c8a0c2397dc3ef8e75c5b4e79955775dc (diff)
downloadaur-a287502ea2b3809f8ab0c23ea3917e8563f3ef9f.tar.gz
Update to v3.0.0 and move out of /opt, into /usr/lib and /var/lib.
Diffstat (limited to 'sabnzbd.install')
-rw-r--r--sabnzbd.install24
1 files changed, 24 insertions, 0 deletions
diff --git a/sabnzbd.install b/sabnzbd.install
new file mode 100644
index 000000000000..6a59003c54b9
--- /dev/null
+++ b/sabnzbd.install
@@ -0,0 +1,24 @@
+post_upgrade() {
+ # Test for the *old* config file and *lack* of new config file, move if needed.
+ if [[ -f /opt/sabnzbd/sabnzbd.ini && ! -f /var/lib/sabnzbd/sabnzbd.ini ]]; then
+ mv /opt/sabnzbd/sabnzbd/ini /var/lib/sabnzbd/
+ echo "Moved sabnzbd.ini from /opt/sabnzbd to /var/lib/sabnzbd."
+ fi
+
+ # Test for old admin folder and *lack* of new admin folder, move if needed.
+ if [[ -d /opt/sabnzbd/admin && ! -d /var/lib/sabnzbd/admin ]]; then
+ mv /opt/sabnzbd/admin /var/lib/sabnzbd/
+ echo "Moved admin folder from /opt/sabnzbd to /var/lib/sabnzbd/."
+ fi
+
+ # Test for old logs folder and *lack* of new logs folder, move if needed.
+ if [[ -d /opt/sabnzbd/logs && ! -d /var/lib/sabnzbd/logs ]]; then
+ mv /opt/sabnzbd/logs /var/lib/sabnzbd/
+ echo "Moved logs folder from /opt/sabnzbd to /var/lib/sabnzbd/."
+ fi
+
+ # Test for old install location, suggest removal.
+ if [[ -d /opt/sabnzbd ]]; then
+ echo "Remove /opt/sabnzbd if everything is working correctly from /var/lib/sabnzbd now."
+ fi
+}