Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoresponder with expect not working #239

Open
franklin-gedler opened this issue Nov 12, 2022 · 0 comments
Open

autoresponder with expect not working #239

franklin-gedler opened this issue Nov 12, 2022 · 0 comments

Comments

@franklin-gedler
Copy link

I have a script_1 in bash which executes a script_2 in bash but using expect

/usr/bin/expect -c " set timeout 1 spawn su - $usr -c '/tmp/script_2' expect \"Password: \" send \"$pass\r\" interact "
$usr and $pass I capture them with osascript inside script_1
when executing the app it executes the line: spawn su - $usr -c '/tmp/script_2'
but it waits about 10 seconds then it shows the output "Password: " and immediately the app finishes the execution.

It will be that platypus when detecting a stdin signal automatically cuts the execution of the app?
can expect be used inside app built with platypus?

script_1 is executed with a user1, then inside script_1 it executes expect to call script_2 but with the environment of another user, which would be user2

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

No branches or pull requests

1 participant