diff --git a/etc/nextcloudpi-config.d/nc-notify-updates.sh b/etc/nextcloudpi-config.d/nc-notify-updates.sh index 147f346e5..f96436cb1 100644 --- a/etc/nextcloudpi-config.d/nc-notify-updates.sh +++ b/etc/nextcloudpi-config.d/nc-notify-updates.sh @@ -40,6 +40,7 @@ Description=Notify in NC when a NextCloudPi update is available [Service] Type=simple ExecStart=/usr/local/bin/ncp-notify-update +ExecStartPost=/usr/local/bin/ncp-notify-unattended-upgrade [Install] WantedBy=default.target @@ -76,13 +77,41 @@ IFACE=\$( ip r | grep "default via" | awk '{ print \$5 }' ) IP=\$( ip a | grep "global \$IFACE" | grep -oP '\d{1,3}(\.\d{1,3}){3}' | head -1 ) sudo -u www-data php /var/www/nextcloud/occ notification:generate \ - $USER_ "NextCloudPi \$( cat \$VERFILE )" \ - -l "NextCloudPi \$( cat \$LATEST ) is available. Update from https://\$IP:4443" + $USER_ "NextCloudPi update" \ + -l "Update from \$( cat \$VERFILE ) to \$( cat \$LATEST ) is available. Update from https://\$IP:4443" cat \$LATEST > \$NOTIFIED EOF chmod +x /usr/local/bin/ncp-notify-update + cat > /usr/local/bin/ncp-notify-unattended-upgrade < /etc/systemd/system/nc-notify-updates.timer < /run/ncp.log EOF chmod 700 /home/www/ncp-launcher.sh +# update notify-updates to also notify about unattended upgrades +cat > /etc/systemd/system/nc-notify-updates.service <