diff --git a/scripts/change_url b/scripts/change_url index ae914ad..3a9b28d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -32,7 +32,7 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 3fd8b18..6924ac7 100755 --- a/scripts/restore +++ b/scripts/restore @@ -59,7 +59,7 @@ yunohost service add $app --description="Modern GPS tracking platform" --log="/v ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 # Typically you only have either $app or php-fpm but not both at the same time... -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 77d47d5..e0a324e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,7 +29,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from manifest.toml - ynh_setup_source --dest_dir="$install_dir" + ynh_setup_source --dest_dir="$install_dir" --keep="conf/traccar.xml" fi chown -R $app:www-data "$install_dir" @@ -53,10 +53,10 @@ yunohost service add $app --description="Modern GPS tracking platform" --log="/v #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=1 -ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" +ynh_add_config --template="traccar.xml" --destination="$install_dir/conf/traccar.xml" -chmod 400 "$install_dir/some_config_file" -chown $app:$app "$install_dir/some_config_file" +chmod 400 "$install_dir/conf/traccar.xml" +chown $app:$app "$install_dir/conf/traccar.xml" #================================================= # START SYSTEMD SERVICE