tgt/tgtd.service
Lee Duncan be7c4d23bf Accepting request 313783 from home:bmwiedemann:branches:Base:System
fix tgtd start by giving tgtd time to open the socket (bnc#934642)
  and use bash to run multiple programs in ExecStartPost

OBS-URL: https://build.opensuse.org/request/show/313783
OBS-URL: https://build.opensuse.org/package/show/Base:System/tgt?expand=0&rev=28
2015-06-26 15:55:34 +00:00

16 lines
479 B
Desktop File

[Unit]
Description=tgt admin
After=network.target
[Service]
Type=forking
User=root
ExecStart=/usr/sbin/tgtd
ExecStartPost=/bin/bash -c "sleep 0.5 ; /usr/sbin/tgtadm --op update --mode sys --name State -v offline ; /usr/sbin/tgt-admin -e -c /etc/tgt/targets.conf ; /usr/sbin/tgtadm --op update --mode sys --name State -v ready"
ExecStopPre=/usr/sbin/tgt-admin --update ALL -c /dev/null
ExecStop=-/usr/sbin/tgtadm --op delete --mode system
[Install]
WantedBy=multi-user.target