mirror of
https://github.com/YunoHost-Apps/wordpress_ynh.git
synced 2024-09-03 20:36:10 +02:00
Update upgrade
This commit is contained in:
parent
785873576c
commit
7d1cad5f6f
1 changed files with 27 additions and 11 deletions
|
@ -3,20 +3,36 @@
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$(sudo yunohost app setting wordpress domain)
|
domain=$(sudo yunohost app setting wordpress domain)
|
||||||
path=$(sudo yunohost app setting wordpress path)
|
path=$(sudo yunohost app setting wordpress path)
|
||||||
|
|
||||||
admin_wordpress=$(sudo yunohost app setting wordpress admin)
|
admin_wordpress=$(sudo yunohost app setting wordpress admin)
|
||||||
#if [ $admin_wordpress = '' ];
|
if [ $admin_wordpress = '' ];
|
||||||
#then
|
then
|
||||||
# mysql -u root -p$root_pwd $db_name -e "select MAX(user_login) from wp_users where user_status=0 INTO OUTFILE '/tmp/wordpressuser';"
|
mysql -u root -p$root_pwd $db_name -e "select MAX(user_login) from wp_users where user_status=0 INTO OUTFILE '/tmp/wordpressuser';"
|
||||||
#fi
|
admin_wordpress = $(cat /tmp/wordpressuser)
|
||||||
|
rm /tmp/wordpressuser
|
||||||
|
fi
|
||||||
|
|
||||||
language=$(sudo yunohost app setting wordpress language)
|
language=$(sudo yunohost app setting wordpress language)
|
||||||
#if [ $language = '' ];
|
if [ $language = '' ];
|
||||||
#then
|
then
|
||||||
# grep WPLANG /var/www/wordpress/wp-config.php | cut -d"'" -f4
|
grep WPLANG /var/www/wordpress/wp-config.php | cut -d"'" -f4
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
is_public=$(sudo yunohost app setting wordpress is_public)
|
is_public=$(sudo yunohost app setting wordpress is_public)
|
||||||
#if [ is_public = '' ];
|
if [ is_public = '' ];
|
||||||
#then
|
then
|
||||||
# mysql -u root -p$root_pwd $db_name -e "select * from wp_options where option_name='http_authentication_options'";
|
mysql -u root -p$root_pwd $db_name -e "select option_value from wp_options WHERE option_name='active_plugins' INTO OUTFILE '/tmp/wordpressispublic';"
|
||||||
|
grep http-authentication /tmp/wordpressispublic > /dev/null 2>&1
|
||||||
|
if [ $? = 0 ];
|
||||||
|
then
|
||||||
|
is_public = 'Yes'
|
||||||
|
else
|
||||||
|
is_public = 'No'
|
||||||
|
fi
|
||||||
|
rm /tmp/wordpressispublic
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
# Check if admin is not null
|
# Check if admin is not null
|
||||||
|
|
Loading…
Add table
Reference in a new issue