mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-25 07:07:46 +01:00
quote escaping
This commit is contained in:
parent
e12ed58107
commit
17bd13e580
1 changed files with 1 additions and 8 deletions
|
@ -103,7 +103,7 @@ if sys.argv[1] == "on":
|
|||
print("*** Checking root SSH keys")
|
||||
if Path("/home/root/.ssh/id_rsa.pub").exists() == False:
|
||||
print("Generating root SSH keys ...")
|
||||
subprocess.call("sudo -u root ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N """, shell=True)
|
||||
subprocess.call("sudo -u root ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N \"\"", shell=True)
|
||||
print("DONE")
|
||||
else:
|
||||
print("OK - root id_rsa.pub file exists")
|
||||
|
@ -140,13 +140,6 @@ if sys.argv[1] == "on":
|
|||
|
||||
elif sys.argv[1] == "off":
|
||||
|
||||
# check if already disabled
|
||||
try:
|
||||
subprocess.call("systemctl is-disabled %s" % (SERVICENAME) ,shell=True, universal_newlines=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("Was already OFF")
|
||||
sys.exit(0)
|
||||
|
||||
print("*** Disabling systemd service: %s" % (SERVICENAME))
|
||||
subprocess.call("sudo systemctl stop %s" % (SERVICENAME), shell=True)
|
||||
subprocess.call("sudo systemctl disable %s" % (SERVICENAME), shell=True)
|
||||
|
|
Loading…
Add table
Reference in a new issue