Exit Javarunner

Asked by spyros-liakos on 2018-04-07

I have this code inside my python program from Sikuli ide

scriptbash = '''

set dialogText to text returned of (display dialog "Provide your Password:" default answer "")
return dialogText
EOF
dialogText=$(osascript -e "$applescriptCode");

if [ -n "$dialogText" ]; then
foo=""
foo="$dialogText.txt"

Status=$(curl -s -o /dev/null -w '%{http_code}' https://test.com/users/passcreated/$foo)

if [ $Status -eq 200 ]; then
echo "Log[]: Welcome user!"
else
echo "Log[]: No valid user!"
exit 0
fi
'''
proc = subprocess.Popen(['/bin/bash'],
shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
stdout_output = proc.communicate(scriptbash)[0]
print stdout_output

#continue to script.....

When I make it runnable jar and run it everything works except the "exit 0".
I can't exit the jar runner no matter what I try..!!

You got any suggestion please..?

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
spyros-liakos
Solved:
2018-04-07
Last query:
2018-04-07
Last reply:
spyros-liakos (spy-arts) said : #1

Sorry guys I found it...!!!! :)

It is: killall java

It is very useful to have shell code inside python.. I can deal this way my users login to my application!!