|
|
@ -7,11 +7,15 @@ admin_wordpress=$3 |
|
|
language=$4 |
|
|
language=$4 |
|
|
is_public=$5 |
|
|
is_public=$5 |
|
|
|
|
|
|
|
|
# Check if admin password is not null |
|
|
|
|
|
if [ "$admin_wordpress" = "" ]; then |
|
|
|
|
|
echo "Wrong admin" |
|
|
|
|
|
|
|
|
# Check if admin exists |
|
|
|
|
|
sudo yunohost user list --json | grep -q "\"username\": \"$admin_wordpress\"" |
|
|
|
|
|
if [[ ! $? -eq 0 ]]; then |
|
|
|
|
|
echo "Wrong admin" |
|
|
exit 1 |
|
|
exit 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
sudo yunohost app setting wordpress admin -v $admin_wordpress |
|
|
|
|
|
sudo yunohost app setting wordpress language -v $language |
|
|
|
|
|
sudo yunohost app setting wordpress is_public -v $is_public |
|
|
|
|
|
|
|
|
# Check domain/path availability |
|
|
# Check domain/path availability |
|
|
sudo yunohost app checkurl $domain$path -a wordpress |
|
|
sudo yunohost app checkurl $domain$path -a wordpress |
|
|
|