#!/bin/bash cd /etc/ipcam_rtsp2hls.conf.d/ for f in *-low.conf; do f=${f/-low.conf/} echo "restarting $f" systemctl restart ipcam_rtsp2hls@${f} systemctl restart ipcam_rtsp2hls@${f}-low done