#!/bin/bash for f in $(ls /etc/ipcam_capture.conf.d/ | xargs); do camera="${f/.conf/}" echo "restarting $camera" systemctl restart ipcam_capture@${camera} done