From c34c202a9c6d0315e4f4952c6472ecbe4b095a57 Mon Sep 17 00:00:00 2001 From: moep Date: Wed, 2 Aug 2017 15:09:58 +0200 Subject: [PATCH] prepering this type for combination with __ungleich_nginx_app_proxy --- gencode-remote | 36 ++++++++++++++++++------------------ parameter/required | 1 + 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/gencode-remote b/gencode-remote index 4320996..3d0d6fa 100755 --- a/gencode-remote +++ b/gencode-remote @@ -1,21 +1,13 @@ -#!/bin/sh +#!/bin/sh +x os=$(cat "$__global/explorer/os") -if [ ! "$os" = "debian" ] -then +os_version=$(cat "$__global/explorer/os_version") + +# remove this check, if there is support for othere OS +if [ ! "$os" = "debian" ]; then echo "OS $os is currently not supported." >&2 exit 1 fi -os_version=$(cat "$__global/explorer/os_version") -case "$os_version" in - 8*) - : - ;; - *) - echo "Unsupported version $os_version of $os." >&2 - exit 1 - ;; -esac case "$os" in centos) @@ -25,9 +17,16 @@ case "$os" in case "$os_version" in [1-7]*) restart="/etc/init.d/nginx restart" + echo "Unsupported version $os_version of $os." >&2 + exit 1 + ;; + 8*) + restart="systemctl restart nginx" ;; *) restart="systemctl restart nginx" + echo "Unsupported version $os_version of $os." >&2 + exit 1 ;; esac ;; @@ -40,6 +39,7 @@ case "$os" in ;; esac +# maybe we dont need this if grep -E -q "^(__file|__link)/etc/nginx" "$__messages_in"; then echo $restart fi @@ -53,17 +53,17 @@ admin_pass=$(cat "$__object/parameter/admin-pass") domain=$(cat "$__object/parameter/domain") # TODO check shasum of tar ball +# INSTALL_STATE="$([ -d /var/www/nextcloud ] && cd /var/www/nextcloud && sudo -u www-data php occ status| grep -o true)" +# if [ ! "\$INSTALL_STATE" ] || [ ! -z "\$INSTALL_STATE" ]; then cat <