18 lines
498 B
SYSTEMD
18 lines
498 B
SYSTEMD
|
[Unit]
|
||
|
Description="Generic Target-Mode Service (fb)"
|
||
|
DefaultDependencies=No
|
||
|
After=network.target target.service
|
||
|
Before=remote-fs-pre.target
|
||
|
|
||
|
[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
|