diff options
| -rwxr-xr-x | autopeer_shell.py | 4 | ||||
| -rwxr-xr-x | install.sh | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/autopeer_shell.py b/autopeer_shell.py index 1e13b71..1d77d43 100755 --- a/autopeer_shell.py +++ b/autopeer_shell.py @@ -223,8 +223,8 @@ if __name__ == '__main__': shell = AutopeerShell() command = os.getenv('SSH_ORIGINAL_COMMAND', '') if len(command): - sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} ran {command}", text=True) + sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} ran {command} via {os.getenv('SSH_CONNECTION')}", text=True) shell.onecmd(command) else: - sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} logged in", text=True) + sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} logged in via {os.getenv('SSH_CONNECTION')}", text=True) shell.cmdloop() @@ -20,6 +20,8 @@ umask 0007 mkdir /opt/autopeer/db echo 'CREATE TABLE peers (name, asn, ipll, endpoint, port, pubkey, creator_ip, creator_name, creator_date, deleted, primary key (name, asn));' | python3 -m sqlite3 /opt/autopeer/db/sqlite3.db chgrp -R autopeer /opt/autopeer/db/ +chmod 770 /opt/autopeer/db +chmod 660 /opt/autopeer/db/sqlite3.db umask 0077 wg genkey >/etc/wireguard/privkey |
