Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Redis Server initial setup #24

Open
arvindk459895 opened this issue Nov 4, 2022 · 0 comments
Open

Redis Server initial setup #24

arvindk459895 opened this issue Nov 4, 2022 · 0 comments

Comments

@arvindk459895
Copy link

What should be the redis server id ?

#!/usr/bin/env python3
import os
import subprocess
#export REDIS_URL=redis://localhost:9000

p = subprocess.Popen(["tmux", "ls"], stdout=subprocess.PIPE)
out, err = p.communicate()
if "ssh-tunneling" in out.decode("utf-8"):
print("ssh-tunneling already exists")
exit()

print("This script makes ssh-tunneling between your redis-server and this machine.")

server = input("redis-server URL : ")
login = input("redis-server ID : ")

os.system("tmux new-session -s ssh-tunneling -d 'ssh -L 9000:localhost:6379 " + login + "@" + server + "'")

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant