diff --git a/scripts/change_url b/scripts/change_url index 0dedd78..6790f81 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -29,10 +29,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) -# Add settings here as needed by your application -#db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#db_user=$db_name -#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP @@ -75,7 +71,7 @@ fi ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd -ynh_systemd_action --service_name=$app.timer --action="stop" --log_path=systemd +systemctl stop $app.timer #================================================= # MODIFY URL IN NGINX CONF @@ -114,7 +110,8 @@ fi ynh_script_progression --message="Starting a systemd service..." --weight=3 ynh_systemd_action --service_name=$app --action="start" --log_path=systemd -ynh_systemd_action --service_name=$app.timer --action=start --log_path=systemd +systemctl enable $app.timer +systemctl start $app.timer #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index cfaa608..cecdec4 100644 --- a/scripts/install +++ b/scripts/install @@ -143,9 +143,8 @@ chmod 600 $final_path/config/config.yml #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ynh_add_systemd_config - ynh_add_config --template="../conf/invidious.timer" --destination="/etc/systemd/system/$app.timer" +ynh_add_systemd_config #================================================= # SETUP CRON @@ -177,7 +176,8 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service ynh_systemd_action --service_name=$app --action=start --log_path=systemd -ynh_systemd_action --service_name=$app.timer --action=start --log_path=systemd +systemctl enable $app.timer +systemctl start $app.timer #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 1bc9309..73f43dc 100644 --- a/scripts/restore +++ b/scripts/restore @@ -116,7 +116,8 @@ yunohost service add $app --description="Invidious is an alternative front-end t ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action=start --log_path=systemd -ynh_systemd_action --service_name=$app.timer --action=start --log_path=systemd +systemctl enable $app.timer +systemctl start $app.timer #================================================= # RESTORE VARIOUS FILES diff --git a/scripts/upgrade b/scripts/upgrade index 03b3221..fbff334 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,7 +74,7 @@ ynh_abort_if_errors ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action=stop --log_path=systemd -ynh_systemd_action --service_name=$app.timer --action="stop" --log_path=systemd +systemctl stop $app.timer #================================================= # UPGRADE DEPENDENCIES @@ -133,8 +133,8 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring a systemd service..." --weight=2 # Create a dedicated systemd config -ynh_add_systemd_config ynh_add_config --template="../conf/invidious.timer" --destination="/etc/systemd/system/$app.timer" +ynh_add_systemd_config #================================================= # GENERIC FINALIZATION @@ -159,7 +159,8 @@ yunohost service add $app --description="Invidious is an alternative front-end t ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action=restart --log_path=systemd -ynh_systemd_action --service_name=$app.timer --action=start --log_path=systemd +systemctl enable $app.timer +systemctl start $app.timer #================================================= # RELOAD NGINX