mirror of
https://github.com/YunoHost-Apps/wordpress_ynh.git
synced 2024-09-03 20:36:10 +02:00
force_stop silencieux et check user verbeux
This commit is contained in:
parent
b28114f6ad
commit
f7c3f0b385
1 changed files with 3 additions and 10 deletions
|
@ -37,11 +37,7 @@ TRAP_ON
|
||||||
|
|
||||||
|
|
||||||
# Vérifie la validité de l'user admin
|
# Vérifie la validité de l'user admin
|
||||||
sudo yunohost user list --json | grep -q "\"username\": \"$admin_wordpress\""
|
sudo yunohost user list --json | grep -q "\"username\": \"$admin_wordpress\"" || (echo "Wrong admin" && touch /force_stop 2> /dev/null)
|
||||||
if [[ ! $? -eq 0 ]]; then
|
|
||||||
echo "Wrong admin"
|
|
||||||
touch /force_stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Vérifie la présence du / en début de path
|
# Vérifie la présence du / en début de path
|
||||||
if [ $(echo $path | cut -c1) != "/" ]; then
|
if [ $(echo $path | cut -c1) != "/" ]; then
|
||||||
|
@ -50,21 +46,18 @@ fi
|
||||||
|
|
||||||
# Vérifie la disponibilité du path et du domaine.
|
# Vérifie la disponibilité du path et du domaine.
|
||||||
sudo yunohost app checkurl $domain$path -a $app
|
sudo yunohost app checkurl $domain$path -a $app
|
||||||
if [[ ! $? -eq 0 ]]; then
|
|
||||||
touch /force_stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Vérifie que le dossier de destination n'est pas déjà utilisé.
|
# Vérifie que le dossier de destination n'est pas déjà utilisé.
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
if [ -e "$final_path" ]
|
if [ -e "$final_path" ]
|
||||||
then
|
then
|
||||||
echo "This path already contains a folder"
|
echo "This path already contains a folder"
|
||||||
touch /force_stop
|
touch /force_stop 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$path" == "/" ] && [ "$multisite" = "Yes" ]; then
|
if [ "$path" == "/" ] && [ "$multisite" = "Yes" ]; then
|
||||||
echo "Multisite option of wordpress doesn't work at root of domain."
|
echo "Multisite option of wordpress doesn't work at root of domain."
|
||||||
touch /force_stop
|
touch /force_stop 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enregistre les infos dans la config YunoHost
|
# Enregistre les infos dans la config YunoHost
|
||||||
|
|
Loading…
Add table
Reference in a new issue