Skip to content

Instantly share code, notes, and snippets.

@mohemohe
Last active March 12, 2021 08:00
Show Gist options
  • Save mohemohe/66c1e4a7f6fc5e170296 to your computer and use it in GitHub Desktop.
Save mohemohe/66c1e4a7f6fc5e170296 to your computer and use it in GitHub Desktop.
netctlで固定IPにしてsoftetherしようとしたらVPNインターフェースの生成より先にnetctlが上がってきてクッソ困ったでござるの巻 ExecUpPreがないからhookできないでござるよ ニンニン
[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
#!/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