mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-23 19:33:52 +08:00
dragonpilot v2023.07.05
version: dragonpilot v0.9.4 release date: 2023-07-05T18:59:41 dp-dev(priv) master commit: 7b0489feab40283a422d2201ef95a9cb8c06f6cd
This commit is contained in:
18
scripts/sshkey_installer.py
Executable file
18
scripts/sshkey_installer.py
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
|
||||
if __name__ == "__main__":
|
||||
install_key = False
|
||||
if os.path.isfile("/EON"):
|
||||
os.system("setprop persist.neos.ssh 1")
|
||||
os.system("echo -n 1 > /data/params/d/SshEnabled")
|
||||
if not os.path.isfile("/data/params/d/GithubSshKeys"):
|
||||
install_key = True
|
||||
else:
|
||||
with open('/data/params/d/GithubSshKeys') as f:
|
||||
if f.read().strip() == "":
|
||||
install_key = True
|
||||
|
||||
if install_key:
|
||||
os.system("echo -n openpilot > /data/params/d/GithubUsername")
|
||||
os.system("cp /data/openpilot/scripts/ssh_key/setup_keys /data/params/d/GithubSshKeys")
|
||||
Reference in New Issue
Block a user