Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-05-15 07:47:37 +0300
committernachoparker <nacho@ownyourbits.com>2018-05-15 08:36:00 +0300
commit9bd6f81fb60fed3fc49cfee8515972ecc232583a (patch)
tree750bbaf6696d618181afe26aba98cff5f6871557 /etc
parentee92111007a81d6443b3ad3d9471deec9cb71742 (diff)
added nc-autoupdate-ncv0.56.0
Diffstat (limited to 'etc')
-rw-r--r--etc/ncp-config.d/nc-autoupdate-nc.sh59
1 files changed, 59 insertions, 0 deletions
diff --git a/etc/ncp-config.d/nc-autoupdate-nc.sh b/etc/ncp-config.d/nc-autoupdate-nc.sh
new file mode 100644
index 00000000..6d775ab8
--- /dev/null
+++ b/etc/ncp-config.d/nc-autoupdate-nc.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# Automatically apply Nextcloud updates
+#
+# Copyleft 2018 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
+# GPL licensed (see end of file) * Use at your own risk!
+#
+# Usage:
+#
+# ./installer.sh nc-autoupdate-nc.sh <IP>
+#
+# See installer.sh instructions for details
+# More at: https://ownyourbits.com
+#
+
+ACTIVE_=no
+NOTIFYUSER_=ncp
+DESCRIPTION="Automatically apply Nextcloud updates"
+VERSION=13.0.2
+
+configure()
+{
+ [[ $ACTIVE_ != "yes" ]] && {
+ rm /etc/cron.daily/ncp-autoupdate-nc
+ echo "automatic Nextcloud updates disabled"
+ return 0
+ }
+
+ cat > /etc/cron.daily/ncp-autoupdate-nc <<EOF
+#!/bin/bash
+/usr/local/bin/ncp-update-nc "$VERSION" && {
+ VER="\$( sudo -u www-data php /var/www/nextcloud/occ status | grep "version:" | awk '{ print \$3 }' )"
+ sudo -u www-data php /var/www/nextcloud/occ notification:generate \
+ "$NOTIFYUSER_" "NextCloudPlus" -l "Nextcloud was updated to \$VER"
+}
+EOF
+ chmod a+x /etc/cron.daily/ncp-autoupdate-nc
+ echo "automatic Nextcloud updates enabled"
+}
+
+install() { :; }
+
+# License
+#
+# This script is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This script is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this script; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+# Boston, MA 02111-1307 USA
+