diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-09-05 10:47:42 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-09-05 10:48:07 +0300 |
commit | a5beae8d855f20fca0c5323b072bb76fcf188a29 (patch) | |
tree | 85bc91d214a75f9b033a2a37d2f8e2d33856db04 | |
parent | 4c70d1514861484ff283c8679654fb1d5a22db51 (diff) |
nc-autoupdate-ncp: ability to choose the user to notifyv0.26.10
-rw-r--r-- | etc/nextcloudpi-config.d/nc-autoupdate-ncp.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/nextcloudpi-config.d/nc-autoupdate-ncp.sh b/etc/nextcloudpi-config.d/nc-autoupdate-ncp.sh index 21d7120f..fef6b7aa 100644 --- a/etc/nextcloudpi-config.d/nc-autoupdate-ncp.sh +++ b/etc/nextcloudpi-config.d/nc-autoupdate-ncp.sh @@ -14,6 +14,7 @@ # ACTIVE_=no +NOTIFYUSER_=admin DESCRIPTION="Automatically apply NextCloudPi updates" configure() @@ -24,15 +25,14 @@ configure() return 0 } - cat > /etc/cron.daily/ncp-autoupdate <<'EOF' + cat > /etc/cron.daily/ncp-autoupdate <<EOF #!/bin/bash /usr/local/bin/ncp-test-updates && { /usr/local/bin/ncp-update sudo -u www-data php /var/www/nextcloud/occ notification:generate \ - admin "NextCloudPi " \ - -l "NextCloudPi was updated to $( cat /usr/local/etc/ncp-version )" + "$NOTIFYUSER_" "NextCloudPi " \ + -l "NextCloudPi was updated to \$( cat /usr/local/etc/ncp-version )" } - EOF chmod a+x /etc/cron.daily/ncp-autoupdate echo "automatic NextCloudPi updates enabled" |