#!/bin/sh for service in $(systemctl list-units --type service | grep ipcam_rtsp2hls_rkmpp | awk '{print $1}' | grep -v \.slice\$); do systemctl restart $service done