ncp-notify-updates: dont spam cron mail

Signed-off-by: nachoparker <nacho@ownyourbits.com>
This commit is contained in:
nachoparker 2019-05-27 17:56:45 -06:00
parent bfdc47548e
commit c71b37f2b7
3 changed files with 8 additions and 6 deletions

View File

@ -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"

View File

@ -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
}
@ -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

View File

@ -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