Skip to content

Commit 5d8e7aa

Browse files
committed
fix: change .env values
1 parent d19e22c commit 5d8e7aa

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

installer.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,14 @@ def install_ovnode():
8787
lines = []
8888
with open(".env", "r") as f:
8989
for line in f:
90+
replaced = False
9091
for key, value in replacements.items():
91-
if line.startswith(f"{key}="):
92-
line = f"{key}={value}\n"
93-
lines.append(line)
92+
if line.startswith(f"{key}"):
93+
lines.append(f"{key}={value}\n")
94+
replaced = True
95+
break
96+
if not replaced:
97+
lines.append(line)
9498

9599
with open(".env", "w") as f:
96100
f.writelines(lines)
@@ -200,6 +204,8 @@ def uninstall_ovnode():
200204
bash.expect(pexpect.EOF, timeout=60)
201205
bash.close()
202206

207+
pexpect.run("rm -rf /etc/openvpn")
208+
203209
print(
204210
Fore.GREEN
205211
+ "OV-Node uninstallation completed successfully!"

0 commit comments

Comments
 (0)