Create systemd unit template

Create /etc/systemd/system/[email protected]

[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

create_systemd_template.txt · Last modified: 2020/05/21 11:09
Public Domain Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain