1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/limesurvey_ynh.git synced 2024-09-03 19:36:32 +02:00
This commit is contained in:
ericgaspar 2021-07-12 12:35:11 +02:00
parent 5241a9ad49
commit f2caf232fb
3 changed files with 6 additions and 29 deletions

View file

@ -39,7 +39,3 @@ INSERT INTO `lime_plugin_settings` (`id`, `plugin_id`, `model`, `model_id`, `key
(21, 5,NULL,NULL,'is_default','\"1\"');
INSERT INTO `lime_settings_global` VALUES ('defaultlang','__LANGUAGE__'),('AssetsVersion','2620');
{% if is_public == "1" %}
UPDATE `lime_plugin_settings` SET value='\"0\"' WHERE `id`=21;
{% endif %}

View file

@ -288,27 +288,3 @@ ynh_abort_if_up_to_date () {
fi
}
ynh_version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
# In upgrade script allow to test if the app is less than or equal a specific version
#
# usage: ynh_version_le "0.5"
ynh_version_le() {
local version=$(ynh_read_json "/etc/yunohost/apps/$YNH_APP_INSTANCE_NAME/manifest.json" "version" || echo 1.0)
ynh_version_gt "$1" "${version}"
}
# Reload (or other actions) a service and print a log in case of failure.
#
# usage: ynh_system_reload service_name [action]
# | arg: service_name - Name of the service to reload
# | arg: action - Action to perform with systemctl. Default: reload
ynh_system_reload () {
local service_name=$1
local action=${2:-reload}
# Reload, restart or start and print the log if the service fail to start or reload
systemctl $action $service_name || ( journalctl --lines=20 -u $service_name >&2 && false)
}

View file

@ -149,6 +149,11 @@ ynh_add_config --template="../conf/data.sql" --destination="$final_path/data.sql
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < $final_path/data.sql
if [ $is_public -eq 1 ]
then
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" <<< "UPDATE `lime_plugin_settings` SET value='\"0\"' WHERE `id`=21;"
fi
#=================================================
# Add nice themes
#=================================================
@ -173,7 +178,7 @@ ynh_script_progression --message="Apply permissions..." --weight=1
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring permissions..." --time --weight=1
ynh_script_progression --message="Configuring permissions..." --weight=1
# Make app public if necessary
if [ $is_public -eq 1 ]