===== Create systemd unit template ===== Create /etc/systemd/system/dsmc@.service [Unit] Description=Star ISP Scheduler Service [Service] Type=simple #ExecStart=/bin/bash -c "for i in $(cat /opt/tivoli/tsm/client/ba/bin/dsm.sys|grep -i servername|awk '{print $2}'); do /opt/tivoli/tsm/client/ba/bin/dsmc sched -servername=$i; done" ExecStart=/opt/tivoli/tsm/client/ba/bin/dsmc sched -servername=%i [Install] WantedBy=default.target ==== Start service ==== systemctl start dsmc@ISP systemctl start dsmc@ISPMEMS systemctl start dsmc@ISPINCR ==== Enable service ==== systemctl enable dsmc@ISP systemctl enable dsmc@ISPMEMS systemctl enable dsmc@ISPINCR ==== References ==== * https://fedoramagazine.org/systemd-template-unit-files/