diff options
author | nachoparker <nacho@ownyourbits.com> | 2019-01-22 19:34:47 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-01-22 19:38:18 +0300 |
commit | af426a58175f83ca79ee27329cb4876d1835a41f (patch) | |
tree | 99cfed9b85dbae81dad912f0cff7bf5ae397f18a | |
parent | 0e062aa223a331d63775c7720be39058732d6641 (diff) |
armbian: fix cron permissions bugv1.4.4
-rw-r--r-- | bin/ncp/BACKUPS/nc-backup-auto.sh | 1 | ||||
-rw-r--r-- | bin/ncp/BACKUPS/nc-rsync-auto.sh | 1 | ||||
-rw-r--r-- | bin/ncp/BACKUPS/nc-snapshot-auto.sh | 2 | ||||
-rw-r--r-- | bin/ncp/BACKUPS/nc-snapshot-sync.sh | 1 | ||||
-rw-r--r-- | bin/ncp/CONFIG/nc-autoupdate-nc.sh | 2 | ||||
-rw-r--r-- | bin/ncp/CONFIG/nc-autoupdate-ncp.sh | 2 | ||||
-rw-r--r-- | bin/ncp/CONFIG/nc-notify-updates.sh | 1 | ||||
-rw-r--r-- | bin/ncp/CONFIG/nc-scan-auto.sh | 1 | ||||
-rw-r--r-- | bin/ncp/NETWORKING/duckDNS.sh | 2 | ||||
-rw-r--r-- | bin/ncp/NETWORKING/freeDNS.sh | 1 | ||||
-rw-r--r-- | bin/ncp/NETWORKING/spDYN.sh | 2 | ||||
-rw-r--r-- | changelog.md | 14 | ||||
-rwxr-xr-x | update.sh | 3 |
13 files changed, 25 insertions, 8 deletions
diff --git a/bin/ncp/BACKUPS/nc-backup-auto.sh b/bin/ncp/BACKUPS/nc-backup-auto.sh index ef9c8a91..994e9923 100644 --- a/bin/ncp/BACKUPS/nc-backup-auto.sh +++ b/bin/ncp/BACKUPS/nc-backup-auto.sh @@ -25,6 +25,7 @@ EOF chmod +x /usr/local/bin/ncp-backup-auto echo "0 3 */${BACKUPDAYS} * * root /usr/local/bin/ncp-backup-auto" > /etc/cron.d/ncp-backup-auto + chmod 644 /etc/cron.d/ncp-backup-auto service cron restart echo "automatic backups enabled" diff --git a/bin/ncp/BACKUPS/nc-rsync-auto.sh b/bin/ncp/BACKUPS/nc-rsync-auto.sh index a1da426d..b4898087 100644 --- a/bin/ncp/BACKUPS/nc-rsync-auto.sh +++ b/bin/ncp/BACKUPS/nc-rsync-auto.sh @@ -35,6 +35,7 @@ configure() } echo "0 5 */${SYNCDAYS} * * root /usr/bin/rsync -ax --delete \"$DATADIR\" \"$DESTINATION\"" > /etc/cron.d/ncp-rsync-auto + chmod 644 /etc/cron.d/ncp-rsync-auto service cron restart echo "automatic rsync enabled" diff --git a/bin/ncp/BACKUPS/nc-snapshot-auto.sh b/bin/ncp/BACKUPS/nc-snapshot-auto.sh index 2f12cd46..cc7baebd 100644 --- a/bin/ncp/BACKUPS/nc-snapshot-auto.sh +++ b/bin/ncp/BACKUPS/nc-snapshot-auto.sh @@ -44,7 +44,7 @@ configure() /usr/local/bin/btrfs-snp $MOUNTPOINT weekly 4 604800 ../ncp-snapshots /usr/local/bin/btrfs-snp $MOUNTPOINT monthly 12 2592000 ../ncp-snapshots EOF - chmod +x /etc/cron.hourly/btrfs-snp + chmod 644 /etc/cron.hourly/btrfs-snp echo "automatic snapshots enabled" } diff --git a/bin/ncp/BACKUPS/nc-snapshot-sync.sh b/bin/ncp/BACKUPS/nc-snapshot-sync.sh index fb43ffd7..79a11d8a 100644 --- a/bin/ncp/BACKUPS/nc-snapshot-sync.sh +++ b/bin/ncp/BACKUPS/nc-snapshot-sync.sh @@ -44,6 +44,7 @@ configure() [[ "$COMPRESSION" == "yes" ]] && ZIP="-z" echo "30 4 */${SYNCDAYS} * * root /usr/local/bin/btrfs-sync -qd $ZIP \"$SNAPDIR\" \"$DESTINATION\"" > /etc/cron.d/ncp-snapsync-auto + chmod 644 /etc/cron.d/ncp-snapsync-auto service cron restart echo "snapshot sync enabled" } diff --git a/bin/ncp/CONFIG/nc-autoupdate-nc.sh b/bin/ncp/CONFIG/nc-autoupdate-nc.sh index cfd33087..4388fe2a 100644 --- a/bin/ncp/CONFIG/nc-autoupdate-nc.sh +++ b/bin/ncp/CONFIG/nc-autoupdate-nc.sh @@ -35,7 +35,7 @@ if [[ \${PIPESTATUS[0]} -eq 0 ]]; then fi echo "" >> /var/log/ncp.log EOF - chmod a+x /etc/cron.daily/ncp-autoupdate-nc + chmod 644 /etc/cron.daily/ncp-autoupdate-nc echo "automatic Nextcloud updates enabled" } diff --git a/bin/ncp/CONFIG/nc-autoupdate-ncp.sh b/bin/ncp/CONFIG/nc-autoupdate-ncp.sh index d7b9a13f..4fc6388c 100644 --- a/bin/ncp/CONFIG/nc-autoupdate-ncp.sh +++ b/bin/ncp/CONFIG/nc-autoupdate-ncp.sh @@ -26,7 +26,7 @@ if /usr/local/bin/ncp-test-updates; then -l "NextCloudPi was updated to \$( cat /usr/local/etc/ncp-version )" fi EOF - chmod a+x /etc/cron.daily/ncp-autoupdate + chmod 644 /etc/cron.daily/ncp-autoupdate echo "automatic NextCloudPi updates enabled" } diff --git a/bin/ncp/CONFIG/nc-notify-updates.sh b/bin/ncp/CONFIG/nc-notify-updates.sh index b61a8311..0ae1799b 100644 --- a/bin/ncp/CONFIG/nc-notify-updates.sh +++ b/bin/ncp/CONFIG/nc-notify-updates.sh @@ -82,6 +82,7 @@ EOF # check every hour at 40th minute echo "40 */${CHECKINTERVAL} * * * root /usr/local/bin/ncp-notify-update && /usr/local/bin/ncp-notify-unattended-upgrade" > /etc/cron.d/ncp-notify-updates + chmod 644 /etc/cron.d/ncp-notify-updates [[ -f /run/crond.pid ]] && service cron restart echo "update web notifications enabled" diff --git a/bin/ncp/CONFIG/nc-scan-auto.sh b/bin/ncp/CONFIG/nc-scan-auto.sh index 9dc397a4..dbb97eba 100644 --- a/bin/ncp/CONFIG/nc-scan-auto.sh +++ b/bin/ncp/CONFIG/nc-scan-auto.sh @@ -33,6 +33,7 @@ configure() fi echo "${MINS} ${HOUR} ${DAYS} * * root /usr/local/bin/ncp-scan" > /etc/cron.d/ncp-scan-auto + chmod 644 /etc/cron.d/ncp-scan-auto service cron restart echo "automatic scans enabled" diff --git a/bin/ncp/NETWORKING/duckDNS.sh b/bin/ncp/NETWORKING/duckDNS.sh index 6425eaac..4a16b7dd 100644 --- a/bin/ncp/NETWORKING/duckDNS.sh +++ b/bin/ncp/NETWORKING/duckDNS.sh @@ -27,7 +27,7 @@ configure() touch $CRONFILE echo "*/5 * * * * root $INSTALLPATH/duck.sh >/dev/null 2>&1" > "$CRONFILE" chmod 700 "$INSTALLPATH"/duck.sh - chmod +x "$CRONFILE" + chmod 644 "$CRONFILE" # First-time execution of duck script "$INSTALLPATH"/duck.sh > /dev/null 2>&1 diff --git a/bin/ncp/NETWORKING/freeDNS.sh b/bin/ncp/NETWORKING/freeDNS.sh index 8bd42afc..92699de4 100644 --- a/bin/ncp/NETWORKING/freeDNS.sh +++ b/bin/ncp/NETWORKING/freeDNS.sh @@ -39,6 +39,7 @@ EOF chmod +744 /usr/local/bin/freedns.sh echo "*/${UPDATEINTERVAL} * * * * root /bin/bash /usr/local/bin/freedns.sh" > /etc/cron.d/freeDNS + chmod 644 /etc/cron.d/freeDNS service cron restart cd /var/www/nextcloud diff --git a/bin/ncp/NETWORKING/spDYN.sh b/bin/ncp/NETWORKING/spDYN.sh index 961712fa..6220ae52 100644 --- a/bin/ncp/NETWORKING/spDYN.sh +++ b/bin/ncp/NETWORKING/spDYN.sh @@ -101,7 +101,7 @@ configure() # Adds file to cron to run script for DNS record updates and change permissions touch $CRONFILE echo "10 * * * * root $INSTALLPATH/spdnsUpdater.sh $DOMAIN $TOKEN $IPv6 >/dev/null 2>&1" > "$CRONFILE" - chmod +x "$CRONFILE" + chmod 644 "$CRONFILE" # First-time execution of update script and print response from spdns.de server "$INSTALLPATH"/spdnsUpdater.sh "$DOMAIN" "$TOKEN" "$IPv6" diff --git a/changelog.md b/changelog.md index 9dc16497..48aa4212 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,15 @@ -[v1.4.1](https://github.com/nextcloud/nextcloudpi/commit/9e0c100) (2019-01-16) docker: support for ncp-update-nc +[v1.4.4](https://github.com/nextcloud/nextcloudpi/commit/a5db49d) (2019-01-22) armbian: fix cron permissions bug -[v1.4.0](https://github.com/nextcloud/nextcloudpi/commit/1dd1bb7) (2019-01-16) add nc-trusted-domains +[v1.4.3](https://github.com/nextcloud/nextcloudpi/commit/0e062aa) (2019-01-21) dnsmasq: detect IP from config file (#782) + +[v1.4.2 ](https://github.com/nextcloud/nextcloudpi/commit/57728e2) (2019-01-21) Proposed fix for issue #773 (#781) + +[v1.4.1 ](https://github.com/nextcloud/nextcloudpi/commit/d0ca44a) (2019-01-16) docker: support for ncp-update-nc + +[v1.4.0 ](https://github.com/nextcloud/nextcloudpi/commit/1dd1bb7) (2019-01-16) add nc-trusted-domains + +[v1.3.12 ](https://github.com/nextcloud/nextcloudpi/commit/1f11d40) (2019-01-16) add public IP to trusted domains [v1.3.11 ](https://github.com/nextcloud/nextcloudpi/commit/84ac075) (2019-01-16) nc-backup: parallel compression @@ -13,7 +21,7 @@ [v1.3.7 ](https://github.com/nextcloud/nextcloudpi/commit/2ac9b8b) (2019-01-14) ncp-web: allow private IPv6 addresses -[v1.3.6](https://github.com/nextcloud/nextcloudpi/commit/34cba9f) (2019-01-14) nc-automount: add delays to some services in a persistent way +[v1.3.6 ](https://github.com/nextcloud/nextcloudpi/commit/34cba9f) (2019-01-14) nc-automount: add delays to some services in a persistent way [v1.3.5 ](https://github.com/nextcloud/nextcloudpi/commit/6fb9c9b) (2019-01-14) nc-hdd-test: try to detect device type if auto doesnt work @@ -271,6 +271,9 @@ done ncc config:system:set trusted_domains 1 --value=$ip EOF + # fix Armbian cron bug + chmod 644 /etc/cron.daily/* /etc/cron.d/* /etc/cron.hourly/* + # remove redundant opcache configuration. Leave until update bug is fixed -> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815968 # Bug #416 reappeared after we moved to php7.2 and debian buster packages. (keep last) [[ "$( ls -l /etc/php/7.2/fpm/conf.d/*-opcache.ini | wc -l )" -gt 1 ]] && rm "$( ls /etc/php/7.2/fpm/conf.d/*-opcache.ini | tail -1 )" |