1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/prowlarr_ynh.git synced 2024-09-03 20:16:07 +02:00
This commit is contained in:
Éric Gaspar 2023-11-18 18:39:42 +01:00 committed by tituspijean
parent 57c5cf15f8
commit b20ac9a77a
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
3 changed files with 9 additions and 12 deletions

View file

@ -14,14 +14,14 @@ source /usr/share/yunohost/helpers
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --time --weight=1
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
ynh_change_url_nginx_config
@ -31,18 +31,16 @@ ynh_change_url_nginx_config
# UPDATE CONFIGURATION FILE
#=================================================
ynh_exec_warn_less 'ynh_add_config --template="config.xml" --destination="$data_dir/config.xml"'
chmod 750 "$data_dir/config.xml"
chmod o-rwx "$data_dir/config.xml"
chown $app "$data_dir/config.xml"
ynh_add_config --template="config.xml" --destination="$data_dir/config.xml"
chmod 400 "$data_dir/config.xml"
chown $app:$app "$data_dir/config.xml"
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="CommandExecutor: Starting"
@ -50,4 +48,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --time --last
ynh_script_progression --message="Change of URL completed for $app" --last

View file

@ -21,9 +21,9 @@ chmod -R o-rwx "$install_dir"
chown -R $app: "$install_dir"
#=================================================
# RESTORE THE APP DATA DIR
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Restoring the app data directory..." --weight=2
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"

View file

@ -36,7 +36,6 @@ then
ynh_setup_source --dest_dir="$install_dir"
fi
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app: "$install_dir"