mirror of
https://github.com/YunoHost-Apps/phpmyadmin_ynh.git
synced 2024-09-03 19:56:46 +02:00
replace admin by admin_user
This commit is contained in:
parent
953616296b
commit
caecf7a3f8
2 changed files with 7 additions and 7 deletions
|
@ -3,7 +3,7 @@
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$1
|
domain=$1
|
||||||
path=$2
|
path=$2
|
||||||
admin_user=$3
|
admin=$3
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
sudo yunohost app checkurl $domain$path -a phpmyadmin
|
sudo yunohost app checkurl $domain$path -a phpmyadmin
|
||||||
|
@ -12,7 +12,7 @@ if [[ ! $? -eq 0 ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check that admin user is an existing account
|
# Check that admin user is an existing account
|
||||||
sudo yunohost user list | python ../conf/user_list.py | grep "^$admin_user$" >/dev/null
|
sudo yunohost user list | python ../conf/user_list.py | grep "^$admin$" >/dev/null
|
||||||
if [[ ! $? -eq 0 ]]; then
|
if [[ ! $? -eq 0 ]]; then
|
||||||
echo "Error : the chosen admin user does not exist"
|
echo "Error : the chosen admin user does not exist"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -48,8 +48,8 @@ sed -i "s@YNH_PMA_PASSWORD@$db_pwd@g" ../conf/config.inc.php
|
||||||
sed -i "s@YNH_MYSQL_ROOT_PASSWORD@$(sudo cat /etc/yunohost/mysql)@g" ../conf/config.inc.php
|
sed -i "s@YNH_MYSQL_ROOT_PASSWORD@$(sudo cat /etc/yunohost/mysql)@g" ../conf/config.inc.php
|
||||||
sudo cp ../conf/config.inc.php $final_path
|
sudo cp ../conf/config.inc.php $final_path
|
||||||
|
|
||||||
sudo yunohost app addaccess phpmyadmin -u $admin_user
|
sudo yunohost app addaccess phpmyadmin -u $admin
|
||||||
sudo yunohost app setting phpmyadmin admin_user -v $admin_user
|
sudo yunohost app setting phpmyadmin admin -v $admin
|
||||||
|
|
||||||
# Files owned by root, www-data can just read
|
# Files owned by root, www-data can just read
|
||||||
echo "Setting permission..."
|
echo "Setting permission..."
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$(sudo yunohost app setting phpmyadmin domain)
|
domain=$(sudo yunohost app setting phpmyadmin domain)
|
||||||
path=$(sudo yunohost app setting phpmyadmin path)
|
path=$(sudo yunohost app setting phpmyadmin path)
|
||||||
admin_user=$(sudo yunohost app setting phpmyadmin admin_user)
|
admin=$(sudo yunohost app setting phpmyadmin admin)
|
||||||
|
|
||||||
# Remove trailing "/" for next commands
|
# Remove trailing "/" for next commands
|
||||||
path=${path%/}
|
path=${path%/}
|
||||||
|
@ -32,8 +32,8 @@ sed -i "s@YNH_PMA_PASSWORD@$db_pwd@g" ../conf/config.inc.php
|
||||||
sed -i "s@YNH_MYSQL_ROOT_PASSWORD@$(sudo cat /etc/yunohost/mysql)@g" ../conf/config.inc.php
|
sed -i "s@YNH_MYSQL_ROOT_PASSWORD@$(sudo cat /etc/yunohost/mysql)@g" ../conf/config.inc.php
|
||||||
sudo cp ../conf/config.inc.php $final_path
|
sudo cp ../conf/config.inc.php $final_path
|
||||||
|
|
||||||
sudo yunohost app addaccess phpmyadmin -u $admin_user
|
sudo yunohost app addaccess phpmyadmin -u $admin
|
||||||
sudo yunohost app setting phpmyadmin admin_user -v $admin_user
|
sudo yunohost app setting phpmyadmin admin -v $admin
|
||||||
|
|
||||||
# Files owned by root, www-data can just read
|
# Files owned by root, www-data can just read
|
||||||
echo "Setting permission..."
|
echo "Setting permission..."
|
||||||
|
|
Loading…
Reference in a new issue