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
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
path="/path" (PATH)
|
path="/path"
|
||||||
with_sftp=1
|
with_sftp=1
|
||||||
password="myreallystrengthpassword"
|
password="myreallystrengthpassword"
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1
|
||||||
|
php_custom="7.3"
|
||||||
with_mysql=1
|
with_mysql=1
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
|
@ -21,11 +22,12 @@
|
||||||
change_url=1
|
change_url=1
|
||||||
;; Test without sftp
|
;; Test without sftp
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
path="/path" (PATH)
|
path="/path"
|
||||||
with_sftp=0
|
with_sftp=0
|
||||||
password=""
|
password=""
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1
|
||||||
|
php_custom="7.3"
|
||||||
with_mysql=1
|
with_mysql=1
|
||||||
; Checks
|
; Checks
|
||||||
setup_sub_dir=1
|
setup_sub_dir=1
|
||||||
|
@ -33,11 +35,12 @@
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
;; Test without mysql
|
;; Test without mysql
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
path="/path" (PATH)
|
path="/path"
|
||||||
with_sftp=1
|
with_sftp=1
|
||||||
password="myreallystrengthpassword"
|
password="myreallystrengthpassword"
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1
|
||||||
|
php_custom="7.3"
|
||||||
with_mysql=0
|
with_mysql=0
|
||||||
; Checks
|
; Checks
|
||||||
setup_sub_dir=1
|
setup_sub_dir=1
|
||||||
|
|
|
@ -59,6 +59,16 @@
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"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",
|
"name": "with_mysql",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
YNH_PHP_VERSION="7.3"
|
YNH_PHP_VERSION="$php_custom"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
|
|
|
@ -25,6 +25,7 @@ path_url=$YNH_APP_ARG_PATH
|
||||||
with_sftp=$YNH_APP_ARG_WITH_SFTP
|
with_sftp=$YNH_APP_ARG_WITH_SFTP
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
php_custom=$YNH_APP_ARG_PHP_CUSTOM
|
||||||
|
|
||||||
with_mysql=$YNH_APP_ARG_WITH_MYSQL
|
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_mysql --value=$with_mysql
|
||||||
ynh_app_setting_set --app=$app --key=with_sftp --value=$with_sftp
|
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=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
|
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_mysql=$(ynh_app_setting_get --app=$app --key=with_mysql)
|
||||||
with_sftp=$(ynh_app_setting_get --app=$app --key=with_sftp)
|
with_sftp=$(ynh_app_setting_get --app=$app --key=with_sftp)
|
||||||
password=$(ynh_app_setting_get --app=$app --key=password)
|
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)
|
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
|
ynh_app_setting_set --app=$app --key=with_sftp --value=$with_sftp
|
||||||
fi
|
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
|
# Cleaning legacy permissions
|
||||||
if ynh_legacy_permissions_exists; then
|
if ynh_legacy_permissions_exists; then
|
||||||
ynh_legacy_permissions_delete_all
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
Loading…
Add table
Reference in a new issue