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
9574fa9902
commit
1fb4e50974
5 changed files with 12 additions and 9 deletions
|
@ -74,7 +74,8 @@ 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="/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
|
# MODIFY URL IN NGINX CONF
|
||||||
|
@ -112,7 +113,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="/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
|
# RELOAD NGINX
|
||||||
|
|
|
@ -145,7 +145,7 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_add_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"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP CRON
|
# SETUP CRON
|
||||||
|
@ -177,6 +177,7 @@ 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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
|
|
@ -73,7 +73,7 @@ ynh_secure_remove --file="$final_path"
|
||||||
# REMOVE SYSTEMD TIMER
|
# REMOVE SYSTEMD TIMER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_secure_remove --file="/etc/systemd/system/invidious.timer"
|
ynh_secure_remove --file="/etc/systemd/system/$app.timer"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE NGINX CONFIGURATION
|
# REMOVE NGINX CONFIGURATION
|
||||||
|
|
|
@ -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_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/$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
|
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_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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE VARIOUS FILES
|
# RESTORE VARIOUS FILES
|
||||||
|
|
|
@ -74,6 +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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
|
@ -99,9 +100,6 @@ then
|
||||||
# Backup the config file in the temp dir
|
# Backup the config file in the temp dir
|
||||||
cp -a "$final_path/config/config.yml" "$tmpdir/config.yml"
|
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
|
#git clone https://github.com/iv-org/invidious "$final_path" --quiet
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
git pull
|
git pull
|
||||||
|
@ -136,7 +134,7 @@ 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_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
|
# 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_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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Add table
Reference in a new issue