Last active
March 12, 2021 08:00
-
-
Save mohemohe/66c1e4a7f6fc5e170296 to your computer and use it in GitHub Desktop.
netctlで固定IPにしてsoftetherしようとしたらVPNインターフェースの生成より先にnetctlが上がってきてクッソ困ったでござるの巻 ExecUpPreがないからhookできないでござるよ ニンニン
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=exec softether | |
BindsTo=sys-subsystem-net-devices-enp2s0.device | |
After=sys-subsystem-net-devices-enp2s0.device | |
[Service] | |
Type=simple | |
ExecStart=/sh/softether.sh | |
[Install] | |
WantedBy=default.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
systemctl restart softethervpn-client | |
for i in `seq 1 120` | |
do | |
ping 172.16.33.254 -c2 -t1 -q > /dev/null | |
if [ $? -eq 0 ] | |
then | |
break | |
else | |
netctl restart vpn | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment