mirror of
https://github.com/YunoHost-Apps/phpmyadmin_ynh.git
synced 2024-09-03 19:56:46 +02:00
Merge branch 'YunoHost-Apps-master'
This commit is contained in:
commit
a52962dd86
6 changed files with 27 additions and 10 deletions
|
@ -14,7 +14,12 @@
|
|||
* This is needed for cookie based authentication to encrypt password in
|
||||
* cookie
|
||||
*/
|
||||
$cfg['blowfish_secret'] = 'YNH_COOKIE_PASSWD'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
|
||||
/* [YunoHost]
|
||||
* We use the 'config' auth mode, so we don't care about settings
|
||||
* specific to the 'cookie' auth mode
|
||||
*/
|
||||
$cfg['blowfish_secret'] = 'NOT_USED';
|
||||
|
||||
|
||||
/*
|
||||
* Servers configuration
|
||||
|
@ -73,6 +78,10 @@ $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
|
|||
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
|
||||
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
|
||||
|
||||
// 4.5.3.1 update
|
||||
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
|
||||
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
|
||||
|
||||
/* Contrib / Swekey authentication */
|
||||
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
|
||||
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
<<<<<<< HEAD
|
||||
4.4.11
|
||||
=======
|
||||
4.6.3
|
||||
>>>>>>> cdf71f3fb6106bec9648b110eddceb6859a50902
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "phpMyAdmin",
|
||||
"id": "phpmyadmin",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "Manage MySQL databases over the web",
|
||||
"fr": "Application web de gestion des bases de données MySQL"
|
||||
|
@ -11,6 +12,11 @@
|
|||
"email": "julien.malik@paraiso.me"
|
||||
},
|
||||
"multi_instance": "false",
|
||||
"services": [
|
||||
"nginx",
|
||||
"php5-fpm",
|
||||
"mysql"
|
||||
],
|
||||
"arguments": {
|
||||
"install" : [
|
||||
{
|
||||
|
|
8
scripts/install
Executable file → Normal file
8
scripts/install
Executable file → Normal file
|
@ -33,11 +33,10 @@ sudo cp -r ../phpMyAdmin-$version-all-languages/* $final_path
|
|||
echo "Setting up database..."
|
||||
db_user=phpmyadmin
|
||||
db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*/\1/p')
|
||||
cookie_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*/\1/p')
|
||||
sed -i "s@YNH_PMA_USER@$db_user@g" ../conf/create_db.sql
|
||||
sudo yunohost app initdb $db_user -p $db_pwd
|
||||
mysql -u root -p$(sudo cat /etc/yunohost/mysql) < ../conf/create_db.sql
|
||||
mysql -u $db_user -p$db_pwd < $final_path/examples/create_tables.sql
|
||||
mysql -u $db_user -p$db_pwd < $final_path/sql/create_tables.sql
|
||||
sudo yunohost app setting phpmyadmin mysqlpwd -v $db_pwd
|
||||
|
||||
# Configuration
|
||||
|
@ -46,7 +45,6 @@ sed -i "s@YNH_DOMAIN@$domain@g" ../conf/config.inc.php
|
|||
sed -i "s@YNH_PMA_USER@$db_user@g" ../conf/config.inc.php
|
||||
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_COOKIE_PASSWD@$cookie_pwd@g" ../conf/config.inc.php
|
||||
sudo cp ../conf/config.inc.php $final_path
|
||||
|
||||
sudo yunohost app addaccess phpmyadmin -u $admin
|
||||
|
@ -55,8 +53,8 @@ sudo yunohost app setting phpmyadmin admin -v $admin
|
|||
# Files owned by root, www-data can just read
|
||||
echo "Setting permission..."
|
||||
sudo chown -R root: $final_path
|
||||
sudo find $final_path -type f | xargs sudo chmod 644
|
||||
sudo find $final_path -type d | xargs sudo chmod 755
|
||||
sudo find $final_path -type f -exec chmod 644 {} \;
|
||||
sudo find $final_path -type d -exec chmod 755 {} \;
|
||||
# config.inc.php contains sensitive data, restrict its access
|
||||
sudo chown root:www-data $final_path/config.inc.php
|
||||
sudo chmod 640 $final_path/config.inc.php
|
||||
|
|
0
scripts/remove
Executable file → Normal file
0
scripts/remove
Executable file → Normal file
|
@ -32,8 +32,8 @@ db_user=phpmyadmin
|
|||
db_pwd=$(sudo yunohost app setting phpmyadmin mysqlpwd)
|
||||
|
||||
# Update tables
|
||||
mysql -u $db_user -p$db_pwd < $final_path/examples/upgrade_column_info_4_3_0+.sql
|
||||
mysql -u $db_user -p$db_pwd < $final_path/examples/create_tables.sql
|
||||
mysql -u $db_user -p$db_pwd < $final_path/sql/upgrade_column_info_4_3_0+.sql
|
||||
mysql -u $db_user -p$db_pwd < $final_path/sql/create_tables.sql
|
||||
|
||||
# Configuration
|
||||
echo "Configuring application..."
|
||||
|
@ -49,8 +49,8 @@ sudo yunohost app setting phpmyadmin admin -v $admin
|
|||
# Files owned by root, www-data can just read
|
||||
echo "Setting permission..."
|
||||
sudo chown -R root: $final_path
|
||||
sudo find $final_path -type f | xargs sudo chmod 644
|
||||
sudo find $final_path -type d | xargs sudo chmod 755
|
||||
sudo find $final_path -type f -exec chmod 644 {} \;
|
||||
sudo find $final_path -type d -exec chmod 755 {} \;
|
||||
# config.inc.php contains sensitive data, restrict its access
|
||||
sudo chown root:www-data $final_path/config.inc.php
|
||||
sudo chmod 640 $final_path/config.inc.php
|
||||
|
|
Loading…
Reference in a new issue