LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-14-2001, 09:19 AM   #1
el_felipe
Member
 
Registered: Dec 2001
Location: Sicily (Italy)
Distribution: DEBIAN! - (also used: Red Hat, Mandrake, Slackware, SuSE, BestLinux, EasyLinux, muLinux...)
Posts: 92

Rep: Reputation: 15
Kppp: script to kill Licq on closed connection?


I set up kppp to start Licq for me when it connects to internet, but i tried to find something to automatically kill the job... nothing!

does anybody know if there's a way to do that? I basically need a script which retreives the PID of Licq and kills it. I read man pages of kill, pid, pidof... not much help

thanx -el felipe-
 
Old 12-14-2001, 09:25 AM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
not sure about what your doing but heres a generic idea.

you might play around with it.


make a script some what like this and run it from kppp...


#!/bin/sh

#start the program

myprogram &

# wait a while

sleep 60


#kill the program

killall -9 myprogram
 
Old 12-14-2001, 09:38 AM   #3
el_felipe
Member
 
Registered: Dec 2001
Location: Sicily (Italy)
Distribution: DEBIAN! - (also used: Red Hat, Mandrake, Slackware, SuSE, BestLinux, EasyLinux, muLinux...)
Posts: 92

Original Poster
Rep: Reputation: 15
...hey it seems to work!

David,

I just didn't try killall -9 ... now there's virtually no need of a script, just entering "killall -9 licq-bin" in the kppp setup > program to run after disconnecting dialog...

well actually i hope, i'll give it a try and i tell you... thanx!

-el felipe-
 
Old 12-14-2001, 03:33 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Ok I see,

did not realize you were also disconnecting.
 
Old 12-14-2001, 04:37 PM   #5
el_felipe
Member
 
Registered: Dec 2001
Location: Sicily (Italy)
Distribution: DEBIAN! - (also used: Red Hat, Mandrake, Slackware, SuSE, BestLinux, EasyLinux, muLinux...)
Posts: 92

Original Poster
Rep: Reputation: 15
Here's what I've done...

David,

upon connecting:
licq & kmago (I also use kmago..)

upon disconnecting:
killall -9 licq-bin kmago

...that's it, bye bye

el felipe
 
Old 12-14-2001, 04:44 PM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
kewl
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH connection closed after username matcal Linux - Security 4 10-24-2005 11:04 AM
how do i know if the connection is closed using a nonblocking socket? Thinking Programming 2 10-06-2005 08:53 AM
ssh connection closed by server m_yates Linux - Security 3 08-10-2005 03:12 PM
Proftpd - 421 connection closed toddism Linux - Software 0 11-24-2004 04:08 PM
Pop3 connection closed Madrinator Linux - Networking 3 09-29-2003 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration