1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
[Unit]
Description=iSCSI target framework daemon
Documentation=man: tgtd(8)
After=network.target
# On systems without virtual consoles, don't start any getty. Note
# that serial gettys are covered by serial-getty@.service, not this
# unit.
ConditionPathExists=/etc/tgt/targets.conf
[Service]
Type=forking
Environment=TGTD_CONFIG=/etc/tgt/targets.conf
ExecStart=/usr/sbin/tgtd
ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v offline
ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v ready
ExecStartPost=/usr/sbin/tgt-admin -e -c ${TGTD_CONFIG}
ExecReload=/usr/sbin/tgt-admin --update ALL -f -c ${TGTD_CONFIG}
ExecStop=/usr/sbin/tgtadm --op update --mode sys --name State -v offline
ExecStop=/usr/sbin/tgt-admin --offline ALL
ExecStop=/usr/sbin/tgt-admin --update ALL -c /dev/null -f
ExecStop=/usr/sbin/tgtadm --op delete --mode system
# Exit code: 107 tgtd not running
[Install]
WantedBy=multi-user.target
|