Check installation

This commit is contained in:
Alexandre
2021-11-09 12:24:37 +01:00
parent d8d492c16d
commit 95b5e06434
3 changed files with 34 additions and 34 deletions

View File

@@ -1,12 +1,12 @@
#!/usr/bin/with-contenv bashio
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"
if ! bashio::fs.file_exists '/data/config/www/nextcloud/occ'; then
LAUNCHER=$(find / -name "occ" -print -quit)
fi || bashio::log.info "occ not found"
# Make sure there is an Nextcloud installation
if ! [ "$($LAUNCHER -V)" ]; then
if [[ $($LAUNCHER -V) == *"not installed"* ]]; then
bashio::log.warning "It seems there is no Nextcloud server installed. Please restart the addon after initialization of the user."
exit 0
fi