Skip to content

Commit

Permalink
ncp-notify-updates: dont spam cron mail
Browse files Browse the repository at this point in the history
Signed-off-by: nachoparker <nacho@ownyourbits.com>
  • Loading branch information
nachoparker committed May 27, 2019
1 parent bfdc475 commit c71b37f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bin/ncp/CONFIG/nc-scan-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@



configure()
configure()
{
[[ $ACTIVE != "yes" ]] && {
[[ $ACTIVE != "yes" ]] && {
rm -f /etc/cron.d/ncp-scan-auto
service cron restart
echo "automatic scans disabled"
Expand Down
6 changes: 3 additions & 3 deletions bin/ncp/UPDATES/nc-notify-updates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ NOTIFIED=/var/run/.ncp-version-notified
test -e \$LATEST || exit 0;
/usr/local/bin/ncp-test-updates || { echo "NextCloudPi up to date"; exit 0; }
test -e \$NOTIFIED && [[ "\$( cat \$LATEST )" == "\$( cat \$NOTIFIED )" ]] && {
echo "Found update from \$( cat \$VERFILE ) to \$( cat \$LATEST ). Already notified"
test -e \$NOTIFIED && [[ "\$( cat \$LATEST )" == "\$( cat \$NOTIFIED )" ]] && {
echo "Found update from \$( cat \$VERFILE ) to \$( cat \$LATEST ). Already notified"
exit 0
}
Expand Down Expand Up @@ -81,7 +81,7 @@ EOF
chmod +x /usr/local/bin/ncp-notify-unattended-upgrade

# 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
echo -e "MAILTO=\"\"\n40 */${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

Expand Down
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

[v1.12.8](https://github.com/nextcloud/nextcloudpi/commit/97bbfa7) (2019-05-25) docker: mount timezone
[v1.12.9](https://github.com/nextcloud/nextcloudpi/commit/cc89c7e) (2019-05-27) ncp-notify-updates: dont spam cron mail

[v1.12.8](https://github.com/nextcloud/nextcloudpi/commit/bfdc475) (2019-05-25) docker: mount timezone

[v1.12.7](https://github.com/nextcloud/nextcloudpi/commit/76137ed) (2019-05-25) ncp-app: bump to NC16

Expand Down

0 comments on commit c71b37f

Please sign in to comment.