mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-02 07:10:53 +02:00
Github bot : script beautyshied
This commit is contained in:
@@ -85,7 +85,7 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
for SECVERS in "" ",sec=ntlm" ",sec=ntlmv2" ",sec=ntlmv2i" ",sec=ntlmssp" ",sec=ntlmsspi" ",sec=krb5i" ",sec=krb5"; do
|
for SECVERS in "" ",sec=ntlm" ",sec=ntlmv2" ",sec=ntlmv2i" ",sec=ntlmssp" ",sec=ntlmsspi" ",sec=krb5i" ",sec=krb5"; do
|
||||||
if [ "$MOUNTED" = false ]; then
|
if [ "$MOUNTED" = false ]; then
|
||||||
mount -t cifs -o "rw,file_mode=0775,dir_mode=0775,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$SMBVERS$SECVERS$PUIDPGID$CHARSET$DOMAINVAR" "$disk" /mnt/"$diskname" 2>/dev/null \
|
mount -t cifs -o "rw,file_mode=0775,dir_mode=0775,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$SMBVERS$SECVERS$PUIDPGID$CHARSET$DOMAINVAR" "$disk" /mnt/"$diskname" 2>/dev/null \
|
||||||
&& MOUNTED=true && MOUNTOPTIONS="$SMBVERS$SECVERS$PUIDPGID$CHARSET$DOMAINVAR" || MOUNTED=false
|
&& MOUNTED=true && MOUNTOPTIONS="$SMBVERS$SECVERS$PUIDPGID$CHARSET$DOMAINVAR" || MOUNTED=false
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]] || [ ! -f /data/config/www/ne
|
|||||||
bashio::log.green " "
|
bashio::log.green " "
|
||||||
touch /notinstalled
|
touch /notinstalled
|
||||||
exit 0
|
exit 0
|
||||||
# Is there missing files
|
# Is there missing files
|
||||||
elif [[ $($LAUNCHER -V 2>&1) == *"Composer autoloader not found"* ]] || [[ $($LAUNCHER -V 2>&1) == *"No such file"* ]] ; then
|
elif [[ $($LAUNCHER -V 2>&1) == *"Composer autoloader not found"* ]] || [[ $($LAUNCHER -V 2>&1) == *"No such file"* ]] ; then
|
||||||
bashio::log.red "--------------------------------------------------"
|
bashio::log.red "--------------------------------------------------"
|
||||||
bashio::log.red " Missing files detected, Nextcloud will reinstall "
|
bashio::log.red " Missing files detected, Nextcloud will reinstall "
|
||||||
@@ -63,13 +63,13 @@ elif [[ $($LAUNCHER -V 2>&1) == *"Composer autoloader not found"* ]] || [[ $($LA
|
|||||||
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ maintenance:repair-share-owner"
|
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ maintenance:repair-share-owner"
|
||||||
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ upgrade"
|
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ upgrade"
|
||||||
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ maintenance:mode --off"
|
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ maintenance:mode --off"
|
||||||
# Everything is fine
|
# Everything is fine
|
||||||
elif [[ $($LAUNCHER -V 2>&1) =~ ^"Nextcloud "[0-9].* ]]; then
|
elif [[ $($LAUNCHER -V 2>&1) =~ ^"Nextcloud "[0-9].* ]]; then
|
||||||
# Log
|
# Log
|
||||||
bashio::log.green "----------------------------------------"
|
bashio::log.green "----------------------------------------"
|
||||||
bashio::log.green " Nextcloud $CURRENTVERSION is installed "
|
bashio::log.green " Nextcloud $CURRENTVERSION is installed "
|
||||||
bashio::log.green "----------------------------------------"
|
bashio::log.green "----------------------------------------"
|
||||||
# Tentative to downgrade
|
# Tentative to downgrade
|
||||||
elif [[ $($LAUNCHER -V 2>&1) == *"Downgrading"* ]]; then
|
elif [[ $($LAUNCHER -V 2>&1) == *"Downgrading"* ]]; then
|
||||||
# Get currently installed version
|
# Get currently installed version
|
||||||
version="$($LAUNCHER -V 2>&1)"
|
version="$($LAUNCHER -V 2>&1)"
|
||||||
|
|||||||
Reference in New Issue
Block a user