Linux how to restart a startup script process

Status
Not open for further replies.

superczar

Keymaster
I use a EV-DO dial up connection on my unattended ubuntu home server which is automatically started at reboot/resume after power outage via a startup script

Code:
#!/bin/bash
wvdial
sometimes, the EV-DO connection slows down, which can usually be fixed by a reconnect

Now normally, I would just do a ctrl C to elegantly stop the wvdial process terminal window
However, I am not sure how to do the same on a startup script process

(other than the brute method of ps -A | grep wvdial to find the pid for wvdial and then kill it)

A stop wvdial returns an unknown job error
any pointers?
 
yeah, thats what I do right now

(other than the brute method of ps -A | grep wvdial to find the pid for wvdial and then kill it)

but am sure there should be a more elegant method to do it

Or to rephrase, what would be the equivalent of a control C on a process running detached from a terminal window
 
doesn't seem wvdial has a capability to run as a daemon and it also don't provide any exit switches.
For more elegancy you may try passing SIGINT to the process PID.
 
Status
Not open for further replies.