2013-11-05 12:15:58 +01:00
|
|
|
[Unit]
|
|
|
|
Description=tgt admin
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
2015-09-10 17:35:31 +02:00
|
|
|
EnvironmentFile=-/etc/sysconfig/tgt
|
2013-11-05 12:15:58 +01:00
|
|
|
Type=forking
|
|
|
|
User=root
|
2015-09-10 17:35:31 +02:00
|
|
|
ExecStart=/usr/sbin/tgtd $TGTD_OPTS
|
2015-06-26 17:55:34 +02:00
|
|
|
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"
|
2015-09-10 17:35:31 +02:00
|
|
|
# only valid in .socket: ExecStopPre=/usr/sbin/tgt-admin --update ALL -c /dev/null
|
2013-11-05 12:15:58 +01:00
|
|
|
ExecStop=-/usr/sbin/tgtadm --op delete --mode system
|
|
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|