mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-10 12:53:01 +02:00
fix strings
This commit is contained in:
@@ -71,10 +71,10 @@ if sys.argv[1] == "on":
|
|||||||
port_internal = ports[0]
|
port_internal = ports[0]
|
||||||
port_external = ports[1]
|
port_external = ports[1]
|
||||||
if port_internal.isdigit() == False:
|
if port_internal.isdigit() == False:
|
||||||
print(f"[INTERNAL-PORT]:[EXTERNAL-PORT] internal not number '%s'" % (sys.argv[i]))
|
print("[INTERNAL-PORT]:[EXTERNAL-PORT] internal not number '%s'" % (sys.argv[i]))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
if port_external.isdigit() == False:
|
if port_external.isdigit() == False:
|
||||||
print(f"[INTERNAL-PORT]:[EXTERNAL-PORT] external not number '%s'" % (sys.argv[i]))
|
print("[INTERNAL-PORT]:[EXTERNAL-PORT] external not number '%s'" % (sys.argv[i]))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
additional_parameters= additional_parameters + "-R %s:localhost:%s " % (port_external,port_internal)
|
additional_parameters= additional_parameters + "-R %s:localhost:%s " % (port_external,port_internal)
|
||||||
@@ -97,16 +97,16 @@ if sys.argv[1] == "on":
|
|||||||
service_file.close()
|
service_file.close()
|
||||||
|
|
||||||
# enable service
|
# enable service
|
||||||
print(f"*** Enabling systemd service: {{SERVICENAME}}")
|
print("*** Enabling systemd service: SERVICENAME")
|
||||||
subprocess.call(f"systemctl daemon-reload", shell=True)
|
subprocess.call("systemctl daemon-reload", shell=True)
|
||||||
#subprocess.call(f"systemctl enable {SERVICENAME}", shell=True)
|
#subprocess.call(f"systemctl enable {SERVICENAME}", shell=True)
|
||||||
print()
|
print()
|
||||||
|
|
||||||
# final info (can be ignored if run by other script)
|
# final info (can be ignored if run by other script)
|
||||||
print(f"*** OK - SSH TUNNEL SERVICE STARTED ***")
|
print("*** OK - SSH TUNNEL SERVICE STARTED ***")
|
||||||
#print(f"- Make sure the SSH pub key of this RaspiBlitz is in 'authorized_keys' of {} ")
|
#print("- Make sure the SSH pub key of this RaspiBlitz is in 'authorized_keys' of {} ")
|
||||||
print(f"- Tunnel service needs final reboot to start.")
|
print("- Tunnel service needs final reboot to start.")
|
||||||
#print(f"- After reboot check logs: sudo journalctl -f -u {SERVICENAME}")
|
#print("- After reboot check logs: sudo journalctl -f -u {SERVICENAME}")
|
||||||
|
|
||||||
#
|
#
|
||||||
# SWITCHING OFF
|
# SWITCHING OFF
|
||||||
|
Reference in New Issue
Block a user