Post by Giuseppe Della Bianca]zac[
Post by robertoSolo alcuni hanno anche il parametro status.
???
Non ho trovato nessun servizio che non avesse un comando per richiedere lo
status, e poi service di rh si limita a lanciare gli script in init.d con
Questa e' la mia debian:
proliant:/etc/init.d# grep -l status *
fiaif
hdparm
hotplug
mysql
xprint
proliant:/etc/init.d# ls
README fam makedev samba
acct festival mdadm screen-cleanup
apache fiaif mdadm-raid sendsigs
atd firehol module-init-tools setmixer
bastille-firewall gdomap modutils setserial
bluez-utils gnustep_sndd mountall.sh shaperd
boa halt mountnfs.sh single
bootclean.sh hdparm mountvirtfs skeleton
bootlogd hostname.sh mysql slpd
bootmisc.sh hotplug networking ssh
checkfs.sh hotplug-net nfs-common stop-bootlogd
checkroot.sh hwclock.sh nfs-kernel-server sudo
clamav-daemon hwclockfirst.sh ntop sysklogd
clamav-freshclam ifupdown nviboot timidity
console-cyrillic ifupdown-clean oss-preserve ulogd
console-screen.sh inetd portmap uml-utilities
cpqarrayd initrd-tools.sh ppp umountfs
cron iptables pppd-dns umountnfs.sh
cupsys irqbalance privoxy urandom
dbus-1 kdm procps.sh vsftpd
dhcp keymap.sh proftpd webmin
dhcp3-server klogd raid2 xdm
dictd libdevmapper1.00 rc xfree86-common
dns-clean libdevmapper1.01 rcS xfs
etc-setserial lm-sensors reboot xprint
exim lpd rmnologin
proliant:/etc/init.d#
Come vedi, il parametro status c'e' solo in pochissimi.
In compenso, si puo' giocare con un find di: nomeservizio.pid in /var/run
per vedere se sono attivi:
proliant:/etc/init.d# find /var/run -name apache.pid
/var/run/apache.pid
Ora, come compito a casa, provate a fare uno scriptino che cerchi
se il servizio e' attivo cercandolo in /var/run. :-P
HINT: variabile PIDFILE nello script in /etc/init.d
--
|Save our planet!
Ciao |Save wildlife!
roberto |For your E-MAIL use ONLY recycled Bytes !!
|roberto poggi ***@softhome.net