集成TUN模式环境适配服务。
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
|
install(PROGRAMS user/r2_tfe DESTINATION ./ COMPONENT Program)
|
||||||
|
install(PROGRAMS user/r3_tfe DESTINATION ./ COMPONENT Program)
|
||||||
install(FILES sysctl/80-tfe.conf DESTINATION /etc/sysctl.d/ COMPONENT Program)
|
install(FILES sysctl/80-tfe.conf DESTINATION /etc/sysctl.d/ COMPONENT Program)
|
||||||
install(FILES service/tfe.service DESTINATION /usr/lib/systemd/system/ COMPONENT Program)
|
install(FILES service/tfe.service DESTINATION /usr/lib/systemd/system/ COMPONENT Program)
|
||||||
|
install(FILES service/tfe-env-tun-mode.service DESTINATION /usr/lib/systemd/system/ COMPONENT Program)
|
||||||
install(FILES service/tfe-env.service DESTINATION /usr/lib/systemd/system/ COMPONENT Program)
|
install(FILES service/tfe-env.service DESTINATION /usr/lib/systemd/system/ COMPONENT Program)
|
||||||
install(FILES service/tfe-env-config DESTINATION /etc/sysconfig/ COMPONENT Profile)
|
install(FILES service/tfe-env-config DESTINATION /etc/sysconfig/ COMPONENT Profile)
|
||||||
|
|||||||
24
script/service/tfe-env-tun-mode.service
Normal file
24
script/service/tfe-env-tun-mode.service
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
[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/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
|
||||||
Reference in New Issue
Block a user