service script/utility
Peter Garrett
peter.garrett at optusnet.com.au
Thu Jul 6 20:28:03 UTC 2006
On Thu, 06 Jul 2006 21:17:26 +0200
Ouattara Aziz <wattazoum at gmail.com> wrote:
> [snip]
> >> Is there a way to know daemon's status on Ubuntu ?
> >
> > Generally or regarding Samba? Reg. samba: See my previous answer:
> > smbstatus.
>
> I was meaning generally. I would like to make a service wrapper script
> which will handle the status statement.
> Mandriva's solution was basically to create a "pid" file when the
> process is on and remove it when they stop the process.
Someone thought of that :-)
peter at prospero:~ $ pidof sshd
5503
peter at prospero:~ $ pidof apache2
5790 5788 5787 5786
and so on....
Thus we see for instance:
peter at prospero:~ $ pidof sshd
8928
peter at prospero:~ $ sudo /etc/init.d/ssh stop
* Stopping OpenBSD Secure Shell server... [ ok ]
peter at prospero:~ $ pidof sshd
peter at prospero:~ $
Peter
More information about the ubuntu-users
mailing list