mirror of
https://github.com/YunoHost-Apps/cesium_ynh.git
synced 2024-09-03 18:06:25 +02:00
try update version include read-only mode if public app
This commit is contained in:
parent
5516455533
commit
6dad66c3ce
3 changed files with 8 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
SOURCE_URL=https://github.com/duniter/cesium/releases/download/v1.6.3/cesium-v1.6.3-web.zip
|
||||
SOURCE_URL=https://github.com/duniter/cesium/releases/download/v1.6.7/cesium-v1.6.7-web.zip
|
||||
SOURCE_SUM=e6bb12bb56453781d01fe0f74afd28990d693010652b542eae0d3348f51d911e
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
|
|
|
@ -23,7 +23,7 @@ yunohost app checkurl "${domain}${path}" -a "$app" \
|
|||
src_path=/var/www/$app
|
||||
mkdir -p $src_path
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_script_progression --message="Setting up source files..." --time --weight=1
|
||||
ynh_script_progression --message="Setting up source files..." --time --weight=1
|
||||
ynh_setup_source --dest_dir=$src_path
|
||||
chown -R www-data: $src_path
|
||||
|
||||
|
@ -33,10 +33,14 @@ sed -i "s@YNH_WWW_PATH@$path@g" $nginx_conf
|
|||
sed -i "s@YNH_WWW_ALIAS@$src_path/@g" $nginx_conf
|
||||
cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
||||
|
||||
|
||||
# If app is public, add url to SSOWat conf as skipped_uris
|
||||
if [[ $is_public -eq 1 ]]; then
|
||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
||||
# activate read-only
|
||||
ynh_replace_string --match_string='"readonly": false,' --replace_string='"readonly": true,' --target_file="$src_path/config.js"
|
||||
fi
|
||||
|
||||
# Reload nginx service
|
||||
|
|
|
@ -46,6 +46,8 @@ cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
|
|||
# If app is public, add url to SSOWat conf as skipped_uris
|
||||
if [[ $is_public -eq 1 ]]; then
|
||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
||||
# activate read-only
|
||||
ynh_replace_string --match_string='"readonly": false,' --replace_string='"readonly": true,' --target_file="$src_path/config.js"
|
||||
fi
|
||||
|
||||
# Reload nginx service
|
||||
|
|
Loading…
Add table
Reference in a new issue