2016-04-26 16:17:33 +02:00
|
|
|
[Unit]
|
|
|
|
Description="Generic Target-Mode Service (fb)"
|
|
|
|
DefaultDependencies=No
|
|
|
|
After=network.target target.service
|
|
|
|
Before=remote-fs-pre.target
|
2019-02-07 18:46:11 +01:00
|
|
|
Conflicts=target.service
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
|
|
|
Environment=CONFIG_FILE=/etc/target/saveconfig.json
|
|
|
|
EnvironmentFile=-/etc/sysconfig/targetcli
|
|
|
|
ExecStart=-/usr/bin/targetcli restoreconfig $CONFIG_FILE
|
|
|
|
RemainAfterExit=true
|
|
|
|
ExecStop=/usr/bin/targetcli clearconfig confirm=True
|
|
|
|
ExecReload=/usr/bin/targetcli restoreconfig $CONFIG_FILE clearexisting
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=remote-fs.target
|