mirror of
https://github.com/YunoHost-Apps/limesurvey_ynh.git
synced 2024-09-03 19:36:32 +02:00
Fix
This commit is contained in:
parent
7daf2364a9
commit
5241a9ad49
2 changed files with 35 additions and 14 deletions
|
@ -38,7 +38,7 @@ INSERT INTO `lime_plugin_settings` (`id`, `plugin_id`, `model`, `model_id`, `key
|
|||
(20, 5, NULL, NULL, 'serverkey', '"REMOTE_USER"'),
|
||||
(21, 5,NULL,NULL,'is_default','\"1\"');
|
||||
|
||||
INSERT INTO `lime_settings_global` VALUES ('defaultlang','{{ language }}'),('AssetsVersion','2620');
|
||||
INSERT INTO `lime_settings_global` VALUES ('defaultlang','__LANGUAGE__'),('AssetsVersion','2620');
|
||||
|
||||
{% if is_public == "1" %}
|
||||
UPDATE `lime_plugin_settings` SET value='\"0\"' WHERE `id`=21;
|
||||
|
|
|
@ -43,7 +43,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
|||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..." --time --weight=1
|
||||
ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
|
@ -88,6 +88,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -109,13 +113,14 @@ ynh_add_fpm_config
|
|||
#=================================================
|
||||
|
||||
# Set permissions
|
||||
set_permissions
|
||||
#set_permissions
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
# CONFIGURE
|
||||
#=================================================
|
||||
|
||||
ynh_add_config --template="../conf/config.php" --destination="$final_path/application/config/config.php"
|
||||
|
||||
#=================================================
|
||||
|
@ -140,8 +145,9 @@ ynh_store_file_checksum "$final_path/application/config/config.php"
|
|||
# LOAD SQL SPECIFIC CONFIG
|
||||
#=================================================
|
||||
|
||||
ynh_configure data.sql ./data.sql
|
||||
mysql -u $db_user -p$db_pwd $db_user < ./data.sql
|
||||
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
|
||||
|
||||
#=================================================
|
||||
# Add nice themes
|
||||
|
@ -156,8 +162,7 @@ mysql -u $db_user -p$db_pwd $db_user < ./data.sql
|
|||
#=================================================
|
||||
ynh_script_progression --message="Apply permissions..." --weight=1
|
||||
|
||||
# Set permissions
|
||||
set_permissions
|
||||
#set_permissions
|
||||
|
||||
#=================================================
|
||||
# SETUP FAIL2BAN
|
||||
|
@ -168,22 +173,34 @@ set_permissions
|
|||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
||||
ynh_script_progression --message="Configuring permissions..." --time --weight=1
|
||||
|
||||
yunohost app addaccess $app -u $admin
|
||||
ynh_sso_access "/index.php?r=admin,/index.php?r=plugins,/scripts"
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
fi
|
||||
|
||||
# Only the admin can access the admin panel of the app (if the app has an admin panel)
|
||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||
|
||||
|
||||
#ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
||||
|
||||
#yunohost app addaccess $app -u $admin
|
||||
#ynh_sso_access "/index.php?r=admin,/index.php?r=plugins,/scripts"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..." --time --weight=1
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
systemctl reload nginx
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# SEND A README FOR THE ADMIN
|
||||
#=================================================
|
||||
ynh_script_progression --message="Sending some explanation to use $app..." --time --weight=1
|
||||
ynh_script_progression --message="Sending some explanation to use $app..." --weight=1
|
||||
|
||||
ynh_print_OFF
|
||||
message="You can now create a poll on this address: https://${domain}${path_url}/admin/
|
||||
|
@ -192,4 +209,8 @@ If you facing an issue or want to improve this app, please open a new issue in t
|
|||
ynh_send_readme_to_admin "$message" "$admin"
|
||||
ynh_print_ON
|
||||
|
||||
ynh_script_progression --message="Installation of $app completed" --time --last
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Installation of $app completed" --last
|
||||
|
|
Loading…
Add table
Reference in a new issue