1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cesium_ynh.git synced 2024-09-03 18:06:25 +02:00
cesium_ynh/scripts/install

43 lines
1.4 KiB
Text
Raw Normal View History

2016-06-13 22:03:33 +02:00
#!/bin/bash
2020-06-15 01:58:37 +02:00
2020-06-03 23:41:51 +02:00
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2016-06-13 22:03:33 +02:00
2020-06-15 01:58:37 +02:00
source _common.sh
2020-06-03 23:41:51 +02:00
source /usr/share/yunohost/helpers
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
2020-06-04 05:36:19 +02:00
ynh_script_progression --message="Setting up source files..."
2016-06-13 22:03:33 +02:00
2020-06-15 01:58:37 +02:00
# Download, check integrity, uncompress and patch the source from app.src
2024-02-28 21:07:14 +01:00
ynh_setup_source --dest_dir="$install_dir"
2020-06-03 23:41:51 +02:00
2024-02-28 21:07:14 +01:00
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
2021-11-12 13:03:18 +01:00
2020-06-03 23:41:51 +02:00
#=================================================
2024-02-28 21:07:14 +01:00
# APP INITIAL CONFIGURATION
2020-06-03 23:41:51 +02:00
#=================================================
2024-02-28 21:07:14 +01:00
ynh_script_progression --message="Adding $app's configuration files..." --weight=1
2020-06-03 23:41:51 +02:00
2024-02-28 21:07:14 +01:00
if ynh_permission_has_user --permission=main --user=visitors; then
ynh_replace_string --match_string='"readonly": false,' --replace_string='"readonly": true,' --target_file="$install_dir/config.js"
2016-06-13 22:03:33 +02:00
fi
2020-06-03 23:41:51 +02:00
#=================================================
2024-02-28 21:07:14 +01:00
# SYSTEM CONFIGURATION
2020-06-03 23:41:51 +02:00
#=================================================
2024-02-28 21:07:14 +01:00
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
2020-06-03 23:41:51 +02:00
2024-02-28 21:07:14 +01:00
# Create a dedicated NGINX config
ynh_add_nginx_config
2020-06-03 23:41:51 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2020-06-15 01:58:37 +02:00
ynh_script_progression --message="Installation of $app completed"