mirror of
https://github.com/YunoHost-Apps/invidious_ynh.git
synced 2024-09-03 19:15:55 +02:00
Fix
This commit is contained in:
parent
6f2de33848
commit
830b4f68d6
4 changed files with 12 additions and 13 deletions
|
@ -29,10 +29,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
# Needed for helper "ynh_add_nginx_config"
|
# Needed for helper "ynh_add_nginx_config"
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
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
|
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
|
||||||
|
@ -75,7 +71,7 @@ fi
|
||||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
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 --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
|
# MODIFY URL IN NGINX CONF
|
||||||
|
@ -114,7 +110,8 @@ fi
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=3
|
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 --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
|
# RELOAD NGINX
|
||||||
|
|
|
@ -143,9 +143,8 @@ chmod 600 $final_path/config/config.yml
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
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_config --template="../conf/invidious.timer" --destination="/etc/systemd/system/$app.timer"
|
||||||
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP CRON
|
# SETUP CRON
|
||||||
|
@ -177,7 +176,8 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
|
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
|
# SETUP SSOWAT
|
||||||
|
|
|
@ -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_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 --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
|
# RESTORE VARIOUS FILES
|
||||||
|
|
|
@ -74,7 +74,7 @@ ynh_abort_if_errors
|
||||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
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 --action=stop --log_path=systemd
|
||||||
ynh_systemd_action --service_name=$app.timer --action="stop" --log_path=systemd
|
systemctl stop $app.timer
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
|
@ -133,8 +133,8 @@ ynh_add_nginx_config
|
||||||
ynh_script_progression --message="Configuring a systemd service..." --weight=2
|
ynh_script_progression --message="Configuring a systemd service..." --weight=2
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
|
||||||
ynh_add_config --template="../conf/invidious.timer" --destination="/etc/systemd/system/$app.timer"
|
ynh_add_config --template="../conf/invidious.timer" --destination="/etc/systemd/system/$app.timer"
|
||||||
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# 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_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 --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
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Add table
Reference in a new issue