1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/sonarr_ynh.git synced 2024-09-03 20:26:19 +02:00

Restart initial sonarr.service if multi-installed

This commit is contained in:
tituspijean 2021-06-12 11:17:50 +02:00
parent 6e338f5709
commit 15c8e54af2
3 changed files with 21 additions and 0 deletions

View file

@ -139,6 +139,13 @@ 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" --line_match="Starting Web Server" --timeout=30
# If a first Sonarr app was running before installing this one,
# it may have been stopped by the installation of the dependencies.
# Let's restart it.
if [[ $(systemctl list-units -all | grep 'sonarr.service' | grep 'inactive') ]]; then
ynh_exec_fully_quiet 'ynh_systemd_action --service_name=sonarr --action="start" --log_path="systemd" --line_match="Starting Web Server" --timeout=30'
fi
#=================================================
# SETUP SSOWAT
#=================================================

View file

@ -112,6 +112,13 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Starting Web Server" --timeout=30
# If a first Sonarr app was running before installing this one,
# it may have been stopped by the installation of the dependencies.
# Let's restart it.
if [[ $(systemctl list-units -all | grep 'sonarr.service' | grep 'inactive') ]]; then
ynh_exec_fully_quiet 'ynh_systemd_action --service_name=sonarr --action="start" --log_path="systemd" --line_match="Starting Web Server" --timeout=30'
fi
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================

View file

@ -129,6 +129,13 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Starting Web Server" --timeout=30
# If a first Sonarr app was running before installing this one,
# it may have been stopped by the installation of the dependencies.
# Let's restart it.
if [[ $(systemctl list-units -all | grep 'sonarr.service' | grep 'inactive') ]]; then
ynh_exec_fully_quiet 'ynh_systemd_action --service_name=sonarr --action="start" --log_path="systemd" --line_match="Starting Web Server" --timeout=30'
fi
#=================================================
# RELOAD NGINX
#=================================================