Remove url as required parameter

This commit is contained in:
Modulos 2017-04-25 11:42:03 +02:00
parent 35f3d9a7f1
commit dca746df49
2 changed files with 7 additions and 13 deletions

View file

@ -19,22 +19,17 @@ case "$os_version" in
exit 1 exit 1
;; ;;
esac esac
nextcloud_url=$(cat "$__object/parameter/url")
if [ ! "${nextcloud_url}" ]
then
echo "Missing nextcloud uri (parameter/url)" >&2
exit 1
fi
nextcloud_version=$(cat "$__object/parameter/version") nextcloud_version=$(cat "$__object/parameter/version")
if [ ! "${nextcloud_version}" ] if [ ! "${nextcloud_version}" ]
then then
echo "Missing nextcloud version (parameter/version)" >&2 echo "Missing nextcloud version (parameter/version)" >&2
exit 1 exit 1
fi fi
nextcloud_uri="${nextcloud_url}-${nextcloud_version}.tar.bz2" # TODO check if url parameter is set
# Download tar ball extract and apply script nextcloud_uri="https://download.nextcloud.com/server/releases/nextcloud-${nextcloud_version}.tar.bz2"
# TODO: verify shasum of tar ball # TODO check shasum of tar ball
curl -LO ${nextcloud_uri} -o /tmp/nextcloud.tar.bz2 cat <<eof
curl -s -L ${nextcloud_uri} -o /tmp/nextcloud.tar.bz2
tar -C /var/www -xvjf /tmp/nextcloud.tar.bz2 tar -C /var/www -xvjf /tmp/nextcloud.tar.bz2
rm /tmp/nextcloud.tar.bz2 rm -f /tmp/nextcloud.tar.bz2
bash "$__type/files/nextcloud.sh" eof

View file

@ -1,2 +1 @@
url
version version