← Back to team overview

sikuli-driver team mailing list archive

[Question #186796]: Send signal to root (time to STOP a script)

 

New question #186796 on Sikuli:
https://answers.launchpad.net/sikuli/+question/186796

Have two cron scripts:

1) As a user - run sikuli

30 13,15,17 * * 1-5 jobfinder.sh
30 15            * * 6     jobfinder.sh
------------------------------------
jobfinder.sh:
#!/bin/sh
DISPLAY=:0; export DISPLAY
xhost +local:
sikuli-ide.sh -r finder.skl
------------------------------------

2) As a root - unbind usb port for 5 min and rebind after

30 13,15,17 * * 1-5 bind_unbind_mouse.sh
30 15             * * 6    bind_unbind_mouse.sh
------------------------------------
bind_unbind_mouse.sh:
#!/bin/sh
DISPLAY=:0; export DISPLAY
xhost +local:
echo '3-3'| tee /sys/bus/usb/drivers/usb/unbind
sleep 360
echo '3-3'| tee /sys/bus/usb/drivers/usb/bind
------------------------------------

So: jobfinder can find a job loss or more than 5 min mouse block.
Question is: how to send a signal to root witch run second script "bind it" when sikuli end jobfinder process?

At the end i'll get 3 scripts:
---1) Unbind usb port
----2) run Sikuli
-----3) Bind usb port

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.