1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00
This commit is contained in:
ericgaspar 2021-06-22 10:35:33 +02:00
parent 6f2de33848
commit 830b4f68d6
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 12 additions and 13 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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