mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-03-09 15:40:05 +00:00
Fix client2client disable
This commit is contained in:
parent
51d12602df
commit
ef1d63ba4d
1 changed files with 2 additions and 1 deletions
|
@ -1519,7 +1519,8 @@ def client2client(*, params: ClienttoClient, current_user: User = Depends(get_cu
|
||||||
for line in f:
|
for line in f:
|
||||||
if not 'client-to-client' in line:
|
if not 'client-to-client' in line:
|
||||||
n.write(line)
|
n.write(line)
|
||||||
n.write('client-to-client' + "\n")
|
if params.enable == True:
|
||||||
|
n.write('client-to-client' + "\n")
|
||||||
os.close(fd)
|
os.close(fd)
|
||||||
move(tmpfile, '/etc/openvpn/tun0.conf')
|
move(tmpfile, '/etc/openvpn/tun0.conf')
|
||||||
final_md5 = hashlib.md5(file_as_bytes(open('/etc/openvpn/tun0.conf', 'rb'))).hexdigest()
|
final_md5 = hashlib.md5(file_as_bytes(open('/etc/openvpn/tun0.conf', 'rb'))).hexdigest()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue