Skip to content

Commit

Permalink
fixed spaces in openpyn.service during init #80
Browse files Browse the repository at this point in the history
  • Loading branch information
jotyGill committed Jan 12, 2018
1 parent 8cb0755 commit 96d96b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openpyn/systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def update_service(openpyn_options, run=False):
openpyn_options = openpyn_options.replace("--daemon", "")
openpyn_location = str(subprocess.check_output("which openpyn".split())) + " "
openpyn_location = openpyn_location[2:-4]
service_text = "[Unit]\nDescription=NordVPN connection manager\nWants=network-online.target\nAfter=network-online.target\nAfter=multi-user.target\n[Service]\nType=simple\nUser=root\nWorkingDirectory=/usr/share/openpyn/\nExecStart=" + openpyn_location + openpyn_options + "\nExecStop=" + openpyn_location + kill_option + "\nStandardOutput=syslog\nStandardError=syslog\n[Install]\nWantedBy=multi-user.target\n"
service_text = "[Unit]\nDescription=NordVPN connection manager\nWants=network-online.target\nAfter=network-online.target\nAfter=multi-user.target\n[Service]\nType=simple\nUser=root\nWorkingDirectory=/usr/share/openpyn/\nExecStart=" + openpyn_location + " " + openpyn_options + "\nExecStop=" + openpyn_location + kill_option + "\nStandardOutput=syslog\nStandardError=syslog\n[Install]\nWantedBy=multi-user.target\n"

with open("/etc/systemd/system/openpyn.service", "w+") as service_file:
service_file.write(service_text)
Expand Down

0 comments on commit 96d96b7

Please sign in to comment.