diff options
author | enoch85 <enoch85@gmail.com> | 2016-06-07 03:23:20 +0300 |
---|---|---|
committer | enoch85 <enoch85@gmail.com> | 2016-06-07 03:23:20 +0300 |
commit | 5c251650c1c33e9977638a658c5c497b679b2132 (patch) | |
tree | 99f89ef07770c22dc0b9f1fba9559a371f398111 /static/update.sh | |
parent | 06b5dd114be972fdfd7469950e361c2c8fe540f8 (diff) |
add new update script that fetches the latest nextclod_update.sh before update
Diffstat (limited to 'static/update.sh')
-rw-r--r-- | static/update.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/static/update.sh b/static/update.sh new file mode 100644 index 00000000..e1b74ca5 --- /dev/null +++ b/static/update.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +## Tech and Me ## - ©2016, https://www.techandme.se/ +# +# Tested on Ubuntu Server 14.04 & 16.04. + +FILE=nextcloud_update.sh +SCRIPTS=/var/scripts + +# Must be root +[[ `id -u` -eq 0 ]] || { echo "Must be root to run script, in Ubuntu type: sudo -i"; exit 1; } + +if [ -f $FILE ]; +then + rm $SCRIPTS/$FILE + wget -q https://raw.githubusercontent.com/nextcloud/vm/master/$FILE -P $SCRIPTS + bash $SCRIPTS/$FILE +else + wget -q https://raw.githubusercontent.com/nextcloud/vm/master/$FILE -P $SCRIPTS + bash $SCRIPTS/$FILE +fi + +chmod +x $SCRIPTS/$FILE + +exit |