This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-tfe/script/service/tfe-env-tun-mode.service
2019-09-07 21:33:02 +08:00

26 lines
709 B
Desktop File

[Unit]
Description=Tango Frontend Engine - Running Environment Setup
Requires=tfe-env.service
Before=tfe-env.service
[Service]
EnvironmentFile=/etc/sysconfig/tfe-env-config
Type=oneshot
RemainAfterExit=yes
# all works are done in execstartpre, this is only a fake target
ExecStart=/bin/true
ExecStop=/bin/true
# start
ExecStartPost=/usr/sbin/ifconfig ${TFE_WATCHDOG_DEVICE} ${TFE_WATCHDOG_IP}
ExecStartPost=/usr/sbin/ip tuntap add dev ${TFE_DEVICE_DATA_INCOMING} mode tap
ExecStartPost=/usr/sbin/ifconfig ${TFE_DEVICE_DATA_INCOMING} up
# stop
ExecStopPost=/usr/bin/systemctl stop tfe-env
ExecStopPost=/usr/sbin/ip tuntap del dev ${TFE_DEVICE_DATA_INCOMING} mode tap
[Install]
WantedBy=multi-user.target