mirror of
https://github.com/YunoHost-Apps/haste_ynh.git
synced 2024-09-03 20:36:28 +02:00
permissions
This commit is contained in:
parent
ac377854f0
commit
3203f50639
2 changed files with 15 additions and 12 deletions
|
@ -136,7 +136,7 @@ ynh_replace_string --match_string="__YNH_DATA_PATH__" --replace_string="$data_pa
|
|||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum "$final_path/config.js"
|
||||
|
||||
# Replace ajax.googleapis.com by local
|
||||
# Replace ajax.googleapis by local file
|
||||
cp ../sources/jquery.min.js "$final_path/static/jquery.min.js"
|
||||
ynh_replace_string --match_string="jquery.min.js" --replace_string="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" --target_file="$final_path/static/jquery.min.js"
|
||||
|
||||
|
@ -150,8 +150,6 @@ ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_f
|
|||
cp ../conf/haste.sh /usr/bin/$app
|
||||
chmod +x /usr/bin/$app
|
||||
|
||||
echo "Please use 'cmd | $app' to paste the output of the command to your Haste server." >&2
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
@ -190,10 +188,13 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
|
|||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
||||
|
||||
if [ $is_public -eq 1 ];
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
ynh_app_setting_set $app skipped_uris "/"
|
||||
# Everyone can access the app.
|
||||
# The "main" permission is automatically created before the install script.
|
||||
ynh_permission_update --permission "main" --add "visitors"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -92,7 +92,7 @@ fi
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
@ -120,8 +120,6 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
|||
pushd "$final_path" || ynh_die
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_npm install
|
||||
# ynh_npm cache clean
|
||||
# ynh_npm update
|
||||
popd || ynh_die
|
||||
|
||||
#=================================================
|
||||
|
@ -160,6 +158,10 @@ ynh_replace_string --match_string="__YNH_DATA_PATH__" --replace_string="$data_pa
|
|||
# Recalculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum "$final_path/config.js"
|
||||
|
||||
# Replace ajax.googleapis by local file
|
||||
cp ../sources/jquery.min.js "$final_path/static/jquery.min.js"
|
||||
ynh_replace_string --match_string="jquery.min.js" --replace_string="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" --target_file="$final_path/static/jquery.min.js"
|
||||
|
||||
#=================================================
|
||||
# UPGRADE HASTE BINARY
|
||||
#=================================================
|
||||
|
@ -191,10 +193,10 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
|
|||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
||||
if [ $is_public -eq 1 ];
|
||||
then
|
||||
ynh_app_setting_set $app skipped_uris "/"
|
||||
fi
|
||||
# if [ $is_public -eq 1 ];
|
||||
# then
|
||||
# ynh_app_setting_set $app skipped_uris "/"
|
||||
# fi
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Reference in a new issue