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
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
parentee92111007a81d6443b3ad3d9471deec9cb71742 (diff)
added nc-autoupdate-ncv0.56.0
-rwxr-xr-x[-rw-r--r--]bin/ncp-update-nc2
-rw-r--r--changelog.md6
-rw-r--r--etc/ncp-config.d/nc-autoupdate-nc.sh59
3 files changed, 64 insertions, 3 deletions
diff --git a/bin/ncp-update-nc b/bin/ncp-update-nc
index 413da12d..8b787c35 100644..100755
--- a/bin/ncp-update-nc
+++ b/bin/ncp-update-nc
@@ -57,7 +57,7 @@ fi
echo "Current Nextcloud version $CURRENT"
echo "Available Nextcloud version $VER"
-[[ "$NEED_UPDATE" == "true" ]] || { echo "Nothing to update"; exit 0; }
+[[ "$NEED_UPDATE" == "true" ]] || { echo "Nothing to update"; exit 1; }
# cleanup
####################
diff --git a/changelog.md b/changelog.md
index 16db7482..d18ac594 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,7 +1,9 @@
-[v0.55.4](https://github.com/nextcloud/nextcloudpi/commit/641cc23) (2018-05-15) nc-autoupdate-ncp: fix wrong user
+[v0.56.0](https://github.com/nextcloud/nextcloudpi/commit/febbb00) (2018-05-15) added nc-autoupdate-nc
-[v0.55.3](https://github.com/nextcloud/nextcloudpi/commit/a57c9f6) (2018-05-15) nc-update-netcloud: include version in backup name
+[v0.55.4](https://github.com/nextcloud/nextcloudpi/commit/ef88be9) (2018-05-15) nc-autoupdate-ncp: fix wrong user
+
+[v0.55.3 ](https://github.com/nextcloud/nextcloudpi/commit/a57c9f6) (2018-05-15) nc-update-netcloud: include version in backup name
[v0.55.2 ](https://github.com/nextcloud/nextcloudpi/commit/e36a214) (2018-05-15) nc-backup: faster free space calculation. Minimize maintenance mode time
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
+