← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #186796]: Send signal from user to root (time to RUN a script)

 

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

Description changed to:
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 less or more than 5 min mouse block.
Question is: how to send a signal to root witch run third script "bind it" when sikuli end jobfinder process? (without sudo or run sikuli under root)

At the end i'll get 3 scripts:
---1) Unbind usb port in same time as sikuli
----2) run Sikuli
-----3) Bind usb port after sikuli end process

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