Merge pull request #926 from YunoHost/add-default-php-in-backup

Add default php in backup
This commit is contained in:
Kayou 2020-04-13 15:52:37 +02:00 committed by GitHub
commit 9c86e64e08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View file

@ -1,5 +1,6 @@
#!/bin/bash
YNH_DEFAULT_PHP_VERSION=7.0
# Declare the actual php version to use.
# A packager willing to use another version of php can override the variable into its _common.sh.
YNH_PHP_VERSION=${YNH_PHP_VERSION:-$YNH_DEFAULT_PHP_VERSION}

View file

@ -59,7 +59,6 @@ APPS_CATALOG_CONF = '/etc/yunohost/apps_catalog.yml'
APPS_CATALOG_CRON_PATH = "/etc/cron.daily/yunohost-fetch-apps-catalog"
APPS_CATALOG_API_VERSION = 2
APPS_CATALOG_DEFAULT_URL = "https://app.yunohost.org/default"
APPS_DEFAULT_PHP_VERSION = "7.0"
re_github_repo = re.compile(
r'^(http[s]?://|git@)github.com[/:]'
@ -348,7 +347,6 @@ def app_change_url(operation_logger, app, domain, path):
env_dict["YNH_APP_ID"] = app_id
env_dict["YNH_APP_INSTANCE_NAME"] = app
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb)
env_dict["YNH_DEFAULT_PHP_VERSION"] = APPS_DEFAULT_PHP_VERSION
env_dict["YNH_APP_OLD_DOMAIN"] = old_domain
env_dict["YNH_APP_OLD_PATH"] = old_path
@ -485,7 +483,6 @@ def app_upgrade(app=[], url=None, file=None):
env_dict["YNH_APP_ID"] = app_id
env_dict["YNH_APP_INSTANCE_NAME"] = app_instance_name
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb)
env_dict["YNH_DEFAULT_PHP_VERSION"] = APPS_DEFAULT_PHP_VERSION
# Start register change on system
related_to = [('app', app_instance_name)]
@ -698,7 +695,6 @@ def app_install(operation_logger, app, label=None, args=None, no_remove_on_failu
env_dict["YNH_APP_ID"] = app_id
env_dict["YNH_APP_INSTANCE_NAME"] = app_instance_name
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(instance_number)
env_dict["YNH_DEFAULT_PHP_VERSION"] = APPS_DEFAULT_PHP_VERSION
# Start register change on system
operation_logger.extra.update({'env': env_dict})
@ -807,7 +803,6 @@ def app_install(operation_logger, app, label=None, args=None, no_remove_on_failu
env_dict_remove["YNH_APP_ID"] = app_id
env_dict_remove["YNH_APP_INSTANCE_NAME"] = app_instance_name
env_dict_remove["YNH_APP_INSTANCE_NUMBER"] = str(instance_number)
env_dict_remove["YNH_DEFAULT_PHP_VERSION"] = APPS_DEFAULT_PHP_VERSION
# Execute remove script
operation_logger_remove = OperationLogger('remove_on_failed_install',
@ -985,7 +980,6 @@ def app_remove(operation_logger, app):
env_dict["YNH_APP_ID"] = app_id
env_dict["YNH_APP_INSTANCE_NAME"] = app
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb)
env_dict["YNH_DEFAULT_PHP_VERSION"] = APPS_DEFAULT_PHP_VERSION
operation_logger.extra.update({'env': env_dict})
operation_logger.flush()
@ -1410,7 +1404,6 @@ def app_action_run(operation_logger, app, action, args=None):
env_dict["YNH_APP_ID"] = app_id
env_dict["YNH_APP_INSTANCE_NAME"] = app
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb)
env_dict["YNH_DEFAULT_PHP_VERSION"] = APPS_DEFAULT_PHP_VERSION
env_dict["YNH_ACTION"] = action
_, path = tempfile.mkstemp()
@ -1474,7 +1467,6 @@ def app_config_show_panel(operation_logger, app):
"YNH_APP_ID": app_id,
"YNH_APP_INSTANCE_NAME": app,
"YNH_APP_INSTANCE_NUMBER": str(app_instance_nb),
"YNH_DEFAULT_PHP_VERSION": APPS_DEFAULT_PHP_VERSION,
}
return_code, parsed_values = hook_exec(config_script,
@ -1548,7 +1540,6 @@ def app_config_apply(operation_logger, app, args):
"YNH_APP_ID": app_id,
"YNH_APP_INSTANCE_NAME": app,
"YNH_APP_INSTANCE_NUMBER": str(app_instance_nb),
"YNH_DEFAULT_PHP_VERSION": APPS_DEFAULT_PHP_VERSION,
}
args = dict(urlparse.parse_qsl(args, keep_blank_values=True)) if args else {}