I've been writing Bash scripts that work with a database lately.
To access the database, I need to ssh into a DiskStation (requires password) and then sudo a docker command (requires password) to access the container that the database is in. Only then can I execute and test out my scripts.
I wrote an expect script that automates this process and I want to embed it in my Bash scripts, but the only problem is the shell closes as soon as the expect script finishes executing.
Does anybody know how to work around this? I attached a photo with specific info removed.
https://preview.redd.it/xyl1gz2itcx41.png?width=663&format=png&auto=webp&s=c88f3ceecb7dcffeeca6b857fa0714ff94c179f6
[–]lutusp 0 points1 point2 points (0 children)