komenco
This commit is contained in:
commit
d61300e5a1
9
readme.md
Normal file
9
readme.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
yum install -y make gcc
|
||||||
|
|
||||||
|
|
||||||
|
systemd unit
|
||||||
|
/usr/lib/systemd/system/vpnserver.service
|
||||||
|
exec script
|
||||||
|
/usr/bin/vpnserver
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
25
vpnserver
Executable file
25
vpnserver
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
/usr/vpnserver/vpnserver "$@"
|
||||||
|
last=$?
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
#ekz
|
||||||
|
#brctl addbr br0
|
||||||
|
#brctl addif br0 eth0
|
||||||
|
#brctl addif br0 tap_test
|
||||||
|
#ip link set dev br0 up
|
||||||
|
#ip addr add 10.10.10.1/24 dev br0
|
||||||
|
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
#ip link set dev br0 down
|
||||||
|
#brctl delbr br0
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $last
|
||||||
13
vpnserver.service
Normal file
13
vpnserver.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=SoftEtherVPN server
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/vpnserver start
|
||||||
|
ExecStop=/usr/bin/vpnserver stop
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user