Update helpers/systemd

Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com>
This commit is contained in:
OniriCorpe 2024-05-23 23:51:02 +02:00 committed by GitHub
parent 95250230bc
commit 8bdaedfde7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -92,8 +92,9 @@ ynh_systemd_action() {
fi
# do not start a service disabled by the user
if [ "$action" == "start" ] || [ "$action" == "reload_or_restart" ] || [ "$action" == "restart" ] && \
! yunohost service status $service_name | grep -q "start_on_boot: disabled"; then
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