Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-05-24 13:19:36 +0300
committernachoparker <nacho@ownyourbits.com>2018-05-24 13:21:09 +0300
commit438e73d199ceacd4996a23d8a7e9b9aefd489b29 (patch)
treec37b8b8f1aa579c098bd0e449a4559fdcc3a7227 /update.sh
parent9e8fc92837d662811ce864e76197f26cbdee9670 (diff)
remove old systemd timer config in running systemsv0.56.9
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh63
1 files changed, 58 insertions, 5 deletions
diff --git a/update.sh b/update.sh
index 1f1b9d5a..fe67af95 100755
--- a/update.sh
+++ b/update.sh
@@ -160,12 +160,65 @@ done
}
# fix update httpd log location in virtual host after nc-datadir
- sed -i "s|CustomLog.*|CustomLog /var/log/apache2/nc-access.log combined|" /etc/apache2/sites-available/nextcloud.conf
- sed -i "s|ErrorLog .*|ErrorLog /var/log/apache2/nc-error.log|" /etc/apache2/sites-available/nextcloud.conf
-
- # fix php cli tmpdir for running instances
DATADIR="$( grep datadirectory /var/www/nextcloud/config/config.php | awk '{ print $3 }' | grep -oP "[^']*[^']" | head -1 )"
- sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $DATADIR|" /etc/php/7.0/cli/php.ini
+ sed -i "s|CustomLog.*|CustomLog $DATADIR/access.log combined|" /etc/apache2/sites-available/nextcloud.conf
+ sed -i "s|ErrorLog .*|ErrorLog $DATADIR/error.log|" /etc/apache2/sites-available/nextcloud.conf
+
+ # fix systemd timer still present
+ [[ -f /etc/systemd/system/nc-scan.service ]] && {
+ systemctl stop nc-scan.service
+ systemctl disable nc-scan.service
+ rm -f /etc/systemd/system/nc-scan.service
+ F="$CONFDIR"/nc-scan-auto.sh
+ grep -q '^ACTIVE_=yes$' "$F" && {
+ cd "$CONFDIR" &>/dev/null
+ activate_script nc-scan-auto.sh
+ cd - &>/dev/null
+ }
+ }
+ [[ -f /etc/systemd/system/nc-scan.timer ]] && {
+ systemctl stop nc-scan.timer
+ systemctl disable nc-scan.timer
+ rm -f /etc/systemd/system/nc-scan.timer
+ }
+ [[ -f /etc/systemd/system/nc-backup.service ]] && {
+ systemctl stop nc-backup
+ systemctl disable nc-backup
+ rm -f /etc/systemd/system/nc-backup.service
+ F="$CONFDIR"/nc-backup-auto.sh
+ grep -q '^ACTIVE_=yes$' "$F" && {
+ cd "$CONFDIR" &>/dev/null
+ activate_script nc-backup-auto.sh
+ cd - &>/dev/null
+ }
+ }
+ [[ -f /etc/systemd/system/freedns.service ]] && {
+ systemctl stop freedns
+ systemctl disable freedns
+ rm -f /etc/systemd/system/freedns.service
+ F="$CONFDIR"/freeDNS.sh
+ grep -q '^ACTIVE_=yes$' "$F" && {
+ cd "$CONFDIR" &>/dev/null
+ activate_script freeDNS.sh
+ cd - &>/dev/null
+ }
+ }
+ [[ -f /etc/systemd/system/nc-notify-updates.service ]] && {
+ systemctl stop nc-notify-updates
+ systemctl disable nc-notify-updates
+ rm -f /etc/systemd/system/nc-notify-updates.service
+ F="$CONFDIR"/nc-notify-updates.sh
+ grep -q '^ACTIVE_=yes$' "$F" && {
+ cd "$CONFDIR" &>/dev/null
+ activate_script nc-notify-updates.sh
+ cd - &>/dev/null
+ }
+ }
+ [[ -f /etc/systemd/system/nc-notify-updates.timer ]] && {
+ systemctl stop nc-notify-updates.timer
+ systemctl disable nc-notify-updates.timer
+ rm -f /etc/systemd/system/nc-notify-updates.timer
+ }
} # end - only live updates