mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Improved code
This commit is contained in:
@@ -28,6 +28,11 @@ done
|
||||
# CHECK STATUS #
|
||||
################
|
||||
|
||||
# Clean remnant files
|
||||
if [ -f /notinstalled ]; then
|
||||
rm /notinstalled
|
||||
fi
|
||||
|
||||
# Get launcher
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ"
|
||||
if [ ! -f /data/config/www/nextcloud/occ ]; then
|
||||
@@ -47,6 +52,7 @@ if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]] || [ ! -f /data/config/www/ne
|
||||
bashio::log.yellow "Nextcloud not installed, please wait for addon startup, login Webui, install Nextcloud, then restart the addon"
|
||||
bashio::log.green "--------------------------------------------------------------------------------------------------------------"
|
||||
bashio::log.green " "
|
||||
touch /notinstalled
|
||||
exit 0
|
||||
elif [[ $($LAUNCHER -V 2>&1) == *"Nextcloud"* ]]; then
|
||||
# Log
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ" || bashio::log.info "/data/config/www/nextcloud/occ not found"
|
||||
if ! bashio::fs.file_exists '/data/config/www/nextcloud/occ'; then
|
||||
LAUNCHER=$(find / -name "occ" -print -quit)
|
||||
fi || bashio::log.info "occ not found"
|
||||
# Only execute if installed
|
||||
if [ -f /notinstalled ]; then exit 0; fi
|
||||
|
||||
# Make sure there is an Nextcloud installation
|
||||
if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]]; then
|
||||
echo "... please install first Nextcloud through the webui"
|
||||
exit 0
|
||||
fi
|
||||
# Specify launcher
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ"
|
||||
|
||||
# Install specific packages
|
||||
if [ ! -d /data/config/www/nextcloud/apps/pdfannotate ]; then
|
||||
|
||||
@@ -2,16 +2,11 @@
|
||||
# shellcheck shell=bash
|
||||
# shellcheck disable=SC2086
|
||||
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ" || bashio::log.info "/data/config/www/nextcloud/occ not found"
|
||||
if ! bashio::fs.file_exists '/data/config/www/nextcloud/occ'; then
|
||||
LAUNCHER=$(find / -name "occ" -print -quit)
|
||||
fi || bashio::log.info "occ not found"
|
||||
# Only execute if installed
|
||||
if [ -f /notinstalled ]; then exit 0; fi
|
||||
|
||||
# Make sure there is an Nextcloud installation
|
||||
if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]]; then
|
||||
echo "... please install first Nextcloud through the webui"
|
||||
exit 0
|
||||
fi
|
||||
# Specify launcher
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ"
|
||||
|
||||
if $LAUNCHER fulltextsearch:test &>/dev/null; then
|
||||
echo "Full Text Search is already working"
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ" || bashio::log.info "/data/config/www/nextcloud/occ not found"
|
||||
if ! bashio::fs.file_exists '/data/config/www/nextcloud/occ'; then
|
||||
LAUNCHER=$(find / -name "occ" -print -quit)
|
||||
fi || bashio::log.info "occ not found"
|
||||
# Only execute if installed
|
||||
if [ -f /notinstalled ]; then exit 0; fi
|
||||
|
||||
# Make sure there is an Nextcloud installation
|
||||
if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]]; then
|
||||
echo "... please install first Nextcloud through the webui"
|
||||
exit 0
|
||||
fi
|
||||
# Specify launcher
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ"
|
||||
|
||||
# Install OCR if requested
|
||||
if [ "$(bashio::config 'OCR')" = "true" ]; then
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ" || bashio::log.info "/data/config/www/nextcloud/occ not found"
|
||||
if ! bashio::fs.file_exists '/data/config/www/nextcloud/occ'; then
|
||||
LAUNCHER=$(find / -name "occ" -print -quit)
|
||||
fi || bashio::log.info "occ not found"
|
||||
# Only execute if installed
|
||||
if [ -f /notinstalled ]; then exit 0; fi
|
||||
|
||||
# Make sure there is an Nextcloud installation
|
||||
if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]]; then
|
||||
echo "... please install first Nextcloud through the webui"
|
||||
exit 0
|
||||
fi
|
||||
# Specify launcher
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ"
|
||||
|
||||
####################
|
||||
# Initialization #
|
||||
|
||||
Reference in New Issue
Block a user