mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge cfcbeb3fa9
into 6aa9d05372
This commit is contained in:
commit
b106c9fcdd
1 changed files with 11 additions and 1 deletions
|
@ -25,7 +25,10 @@ ynh_add_systemd_config() {
|
||||||
|
|
||||||
ynh_add_config --template="$template" --destination="/etc/systemd/system/$service.service"
|
ynh_add_config --template="$template" --destination="/etc/systemd/system/$service.service"
|
||||||
|
|
||||||
systemctl enable $service --quiet
|
if [[ ${YNH_APP_ACTION} == "install" ]]; then
|
||||||
|
systemctl enable $service --quiet
|
||||||
|
fi
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +91,13 @@ ynh_systemd_action() {
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# do not start a service disabled by the user
|
||||||
|
if ([ "$action" == "start" ] || [ "$action" == "reload_or_restart" ] || [ "$action" == "restart" ]) && \
|
||||||
|
! systemctl --quiet is-enabled $service_name; then
|
||||||
|
echo "$service_name is disabled, therefore skipping action $action"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Start to read the log
|
# Start to read the log
|
||||||
if [[ -n "$line_match" ]]; then
|
if [[ -n "$line_match" ]]; then
|
||||||
local templog="$(mktemp)"
|
local templog="$(mktemp)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue