mirror of
https://github.com/YunoHost-Apps/my_webapp_ynh.git
synced 2024-09-03 19:46:26 +02:00
Custom PHP version
This commit is contained in:
parent
2c1ecd06de
commit
6b386c372a
5 changed files with 32 additions and 10 deletions
|
@ -1,10 +1,11 @@
|
|||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
with_sftp=1
|
||||
password="myreallystrengthpassword"
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
is_public=1
|
||||
php_custom="7.3"
|
||||
with_mysql=1
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
|
@ -21,11 +22,12 @@
|
|||
change_url=1
|
||||
;; Test without sftp
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
with_sftp=0
|
||||
password=""
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
is_public=1
|
||||
php_custom="7.3"
|
||||
with_mysql=1
|
||||
; Checks
|
||||
setup_sub_dir=1
|
||||
|
@ -33,11 +35,12 @@
|
|||
backup_restore=1
|
||||
;; Test without mysql
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
with_sftp=1
|
||||
password="myreallystrengthpassword"
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
is_public=1
|
||||
php_custom="7.3"
|
||||
with_mysql=0
|
||||
; Checks
|
||||
setup_sub_dir=1
|
||||
|
|
|
@ -59,6 +59,16 @@
|
|||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "php_custom",
|
||||
"type": "string",
|
||||
"ask": {
|
||||
"en": "Choose a PHP version you want to use for your app",
|
||||
"fr": "Choisissez une version PHP que vous souhaitez utiliser pour votre application"
|
||||
},
|
||||
"choices" : ["7.3", "7.4", "8.0"],
|
||||
"default" : "7.3"
|
||||
},
|
||||
{
|
||||
"name": "with_mysql",
|
||||
"type": "boolean",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
YNH_PHP_VERSION="$php_custom"
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
|
|
|
@ -25,6 +25,7 @@ path_url=$YNH_APP_ARG_PATH
|
|||
with_sftp=$YNH_APP_ARG_WITH_SFTP
|
||||
password=$YNH_APP_ARG_PASSWORD
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
php_custom=$YNH_APP_ARG_PHP_CUSTOM
|
||||
|
||||
with_mysql=$YNH_APP_ARG_WITH_MYSQL
|
||||
|
||||
|
@ -52,6 +53,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url
|
|||
ynh_app_setting_set --app=$app --key=with_mysql --value=$with_mysql
|
||||
ynh_app_setting_set --app=$app --key=with_sftp --value=$with_sftp
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
ynh_app_setting_set --app=$app --key=php_custom --value=$php_custom
|
||||
|
||||
ynh_app_setting_set --app=$app --key=admin_mail_html --value=1
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
with_mysql=$(ynh_app_setting_get --app=$app --key=with_mysql)
|
||||
with_sftp=$(ynh_app_setting_get --app=$app --key=with_sftp)
|
||||
password=$(ynh_app_setting_get --app=$app --key=password)
|
||||
php_custom=$(ynh_app_setting_get --app=$app --key=php_custom)
|
||||
|
||||
admin_mail_html=$(ynh_app_setting_get --app=$app --key=admin_mail_html)
|
||||
|
||||
|
@ -83,6 +84,12 @@ if [ -z "$with_sftp" ]; then
|
|||
ynh_app_setting_set --app=$app --key=with_sftp --value=$with_sftp
|
||||
fi
|
||||
|
||||
# If with_sftp doesn't exist, create it
|
||||
if [ -z "$php_custom" ]; then
|
||||
php_custom="7.3"
|
||||
ynh_app_setting_set --app=$app --key=php_custom --value=$php_custom
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
|
Loading…
Add table
Reference in a new issue