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:
parent
6e338f5709
commit
15c8e54af2
3 changed files with 21 additions and 0 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue