urmic_transcoder/html/stop_all_encoders.sh

16 lines
329 B
Bash

#!/bin/bash
set -e
echo "Stopping and disabling all encoder@ services..."
for svc in $(systemctl list-units --all --no-legend "encoder@*" | awk '{print $1}'); do
echo "Stopping $svc"
systemctl stop "$svc"
echo "Disabling $svc"
systemctl disable "$svc"
done
echo "All encoder@ services stopped and disabled."