LICQ start script
Arne Schmitz <[email protected]>
| Newsgroups | gmane.network.licq.general |
|---|---|
| Message-ID | <[email protected]> |
Hi everyone! I don't know if anyone else has got this problem, but for me, Licq sometimes does not start. This is because there is a stale licq.pid lockfile, and some other process took the PID. The attached script checks if the current user is already running a copy of Licq and if not, it will remove the lockfile. This does not work for multiple Licq base directories, but for the average user it should be fine. Arne -- [--- PGP key FD05BED7 --- http://www.root42.de/ ---]
licq.sh
(application/x-shellscript, 477 B)
#!/bin/bash
LICQ_PID=$(pidof `which licq`)
if [ "$LICQ_PID" == "" ]
then
rm -f ~/.licq/licq.pid 2>&1 > /dev/null
licq
else
USERS=$(ps u --no-headers -p $LICQ_PID | awk '{print $1}' | grep `whoami`)
echo $USERS
if [ "$USERS" == "" ]
then
rm -f ~/.licq/licq.pid 2>&1 > /dev/null
licq
else
LICQ_PID=$(ps u --no-headers -p $LICQ_PID | grep `whoami` | awk '{print $2}')
echo "Licq is already running as $USERS with pid $LICQ_PID."
fi
fi
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDqdojzpP3gv0FvtcRApbqAJ99Rc7Lknp/5z1iJvKRUqEy9Lf2jwCeLy9n g3Ac1c7crw26MYxYFdiC1Aw= =2bSu -----END PGP SIGNATURE-----