friends!
I need a mechanism to verify if the linux virtual private server is utilizing systemctl or service.
The systemd
application is installed on all of them.
Current Code.
if pgrep systemd-journal; then
systemctl restart unbound
else
service unbound restart
fi
service
works anyways here on systemd'ed Fedora 35. filewhich service
/usr/sbin/service: Bourne-Again shell script, ASCII text executable – Artem S. Tashkinov Feb 06 '22 at 19:29systemctl
is available, all services can be controlled with it. It does not make sense to use an older compatibility mechanism when establishing new services. – U. Windl Feb 08 '22 at 13:54