Skip to content

Commit

Permalink
more fixes (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Hansson committed Feb 6, 2018
1 parent 37dc8c3 commit 6c1b17e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib.sh
Expand Up @@ -3,11 +3,6 @@
true
# see https://github.com/koalaman/shellcheck/wiki/Directive

# Example: occ_command 'maintenance:mode --on'
occ_command() {
check_command sudo -u www-data php "$NCPATH"/occ "$1"
}

## variables

# Dirs
Expand Down Expand Up @@ -64,7 +59,7 @@ SSL_CONF="/etc/apache2/sites-available/nextcloud_ssl_domain_self_signed.conf"
HTTP_CONF="/etc/apache2/sites-available/nextcloud_http_domain_self_signed.conf"
HTTP2_CONF="/etc/apache2/mods-available/http2.conf"
# Nextcloud version
[ ! -z "$NC_UPDATE" ] && CURRENTVERSION=$(occ_command "status" | grep "versionstring" | awk '{print $3}')
[ ! -z "$NC_UPDATE" ] && CURRENTVERSION=$(sudo -u www-data php $NCPATH/occ "status" | grep "versionstring" | awk '{print $3}')
NCVERSION=$(curl -s -m 900 $NCREPO/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | sort --version-sort | tail -1)
STABLEVERSION="nextcloud-$NCVERSION"
NCMAJOR="${NCVERSION%%.*}"
Expand Down Expand Up @@ -179,6 +174,11 @@ local PROMPT="$1"
whiptail --msgbox "${PROMPT}" "$WT_HEIGHT" "$WT_WIDTH"
}

# Example: occ_command 'maintenance:mode --on'
occ_command() {
check_command sudo -u www-data php "$NCPATH"/occ "$1"
}

# Check if process is runnnig: is_process_running dpkg
is_process_running() {
PROCESS="$1"
Expand Down
2 changes: 1 addition & 1 deletion static/test_connection.sh
Expand Up @@ -17,5 +17,5 @@ if [ ! -s /tmp/google.idx ]
then
printf "${Red}Not Connected!${Color_Off}\n"
else
printf "${Green}Connected!${Color_Off}\n"
printf "Connected!\n"
fi

0 comments on commit 6c1b17e

Please sign in to comment.