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:21:13 +02:00
parent 9574fa9902
commit 1fb4e50974
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 12 additions and 9 deletions

View file

@ -74,7 +74,8 @@ fi
#=================================================
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
ynh_systemd_action --service_name=$app.timer --action="stop" --log_path=systemd
#=================================================
# MODIFY URL IN NGINX CONF
@ -112,7 +113,8 @@ fi
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=3
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=$app.timer --action=start --log_path=systemd
#=================================================
# RELOAD NGINX

View file

@ -145,7 +145,7 @@ 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/invidious.timer"
ynh_add_config --template="../conf/invidious.timer" --destination="/etc/systemd/system/$app.timer"
#=================================================
# SETUP CRON
@ -177,6 +177,7 @@ 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
#=================================================
# SETUP SSOWAT

View file

@ -73,7 +73,7 @@ ynh_secure_remove --file="$final_path"
# REMOVE SYSTEMD TIMER
#=================================================
ynh_secure_remove --file="/etc/systemd/system/invidious.timer"
ynh_secure_remove --file="/etc/systemd/system/$app.timer"
#=================================================
# REMOVE NGINX CONFIGURATION

View file

@ -100,7 +100,7 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
ynh_script_progression --message="Restoring the systemd configuration..." --weight=5
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
ynh_restore_file --origin_path="/etc/systemd/system/invidious.timer"
ynh_restore_file --origin_path="/etc/systemd/system/$app.timer"
systemctl enable $app.service --quiet
#=================================================
@ -116,6 +116,7 @@ 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
#=================================================
# RESTORE VARIOUS FILES

View file

@ -74,6 +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
#=================================================
# UPGRADE DEPENDENCIES
@ -99,9 +100,6 @@ then
# Backup the config file in the temp dir
cp -a "$final_path/config/config.yml" "$tmpdir/config.yml"
# Remove the app directory securely
#ynh_secure_remove --file=$final_path
#git clone https://github.com/iv-org/invidious "$final_path" --quiet
pushd $final_path
git pull
@ -136,7 +134,7 @@ 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/invidious.timer"
ynh_add_config --template="../conf/invidious.timer" --destination="/etc/systemd/system/$app.timer"
#=================================================
# GENERIC FINALIZATION
@ -161,6 +159,7 @@ 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
#=================================================
# RELOAD NGINX