service script/utility
Ouattara Aziz
wattazoum at gmail.com
Thu Jul 6 20:36:09 UTC 2006
Peter Garrett a écrit :
> 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:~ $
>
Cool ! that's what I wanted . thanks a lot !
___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com
More information about the ubuntu-users
mailing list