mirror of
https://github.com/YunoHost-Apps/my_webapp_ynh.git
synced 2024-09-03 19:46:26 +02:00
Add php-mysql if the database is installed
This commit is contained in:
parent
6e6ce7609c
commit
22f9c65f01
3 changed files with 8 additions and 6 deletions
|
@ -5,7 +5,7 @@
|
|||
with_sftp=1
|
||||
password="myreallystrengthpassword"
|
||||
is_public=1
|
||||
phpversion="7.3"
|
||||
phpversion="7.4"
|
||||
with_mysql=1
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
|
@ -27,7 +27,7 @@
|
|||
with_sftp=0
|
||||
password=""
|
||||
is_public=1
|
||||
phpversion="7.3"
|
||||
phpversion="7.4"
|
||||
with_mysql=1
|
||||
; Checks
|
||||
setup_sub_dir=1
|
||||
|
@ -40,7 +40,7 @@
|
|||
with_sftp=1
|
||||
password="myreallystrengthpassword"
|
||||
is_public=1
|
||||
phpversion="7.3"
|
||||
phpversion="7.4"
|
||||
with_mysql=0
|
||||
; Checks
|
||||
setup_sub_dir=1
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
"email": "maniackc_dev@crudelis.fr"
|
||||
}],
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.3.3"
|
||||
"yunohost": ">= 11.0.9"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php7.3-fpm",
|
||||
"php7.4-fpm",
|
||||
"mysql"
|
||||
],
|
||||
"arguments": {
|
||||
|
@ -65,7 +65,7 @@
|
|||
"fr": "Choisissez une version PHP que vous souhaitez utiliser pour votre application"
|
||||
},
|
||||
"choices" : ["none", "7.3", "7.4", "8.0"],
|
||||
"default" : "7.3"
|
||||
"default" : "7.4"
|
||||
},
|
||||
{
|
||||
"name": "with_mysql",
|
||||
|
|
|
@ -78,6 +78,8 @@ if [ $with_mysql -eq 1 ]
|
|||
then
|
||||
ynh_script_progression --message="Creating a MySQL database..." --weight=2
|
||||
|
||||
ynh_install_app_dependencies "php${phpversion}-mysql"
|
||||
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
|
||||
|
|
Loading…
Add table
Reference in a new issue