zedixal
May 10th, 2013, 10:39 AM
Hi,
I use Xubuntu. I've setup a small script that starts when I log in and continuously checks things:
#!/bin/bash
# Main loop
while [ 1 ]
do
# ... do stuff
sleep 5
done
exit 0
Unfortunately, when I log off and log in as another user, the script is still running... Every time I have to kill it manually.
I'd like to instruct this script to stop when the user that started it logs off. I tried to use the command who, but it seems to detect only the users that have opened a terminal.
Thank you in advance
I use Xubuntu. I've setup a small script that starts when I log in and continuously checks things:
#!/bin/bash
# Main loop
while [ 1 ]
do
# ... do stuff
sleep 5
done
exit 0
Unfortunately, when I log off and log in as another user, the script is still running... Every time I have to kill it manually.
I'd like to instruct this script to stop when the user that started it logs off. I tried to use the command who, but it seems to detect only the users that have opened a terminal.
Thank you in advance