commands.sh

systemctl try-restart

linux

Restart one or more units only if they are currently running.

More info →

Examples (3)

Restart a specific unit if it is running

Restart multiple units if they are running

systemctl try-restart unit1 unit2 ...

Restart all units matching a pattern if they are running

made by @shridhargupta | data from tldr-pages