if systemctl is-active --quiet kysdk-dbus.service; then echo "kysdk-dbus.service is active, restarting..." systemctl restart kysdk-dbus.service else echo "kysdk-dbus.service is not active" fi