Gentoo Archives: gentoo-user-br

From: "Benigno B. Junior" <bbj@g.o>
To: gentoo-user-br@l.g.o
Subject: Re: [gentoo-user-br] Script 'services'
Date: Fri, 07 Jul 2006 22:05:57
Message-Id: 20060707190437.75a2fa80@phanty
In Reply to: Re: [gentoo-user-br] Script 'services' by "Benigno B. Junior"
1 Talvez este seja um pouco mais cuidadoso:
2
3 #!/bin/bash
4
5 . /sbin/functions.sh
6
7 options="start stop reload restart pause zap"
8
9 if [[ $# -lt 2 ]] || [[ " $options " != *" ${!#} "* ]] ; then
10 eerror "Sem acao ou acao invalida ..."
11 exit 1
12 fi
13
14 for service in ${@%${!#}}; do
15 /etc/init.d/$service ${!#}
16 done
17
18 --
19 "Onde há o ser-humano, há a maldade."
20
21 Benigno B. Junior <bbj@g.o>
22 Gentoo Developer - http://dev.gentoo.org/~bbj
23 http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3995B21

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user-br] Script 'services' "Lucas Antônio Reno" <lucas.renoh@×××××.com>
Re: [gentoo-user-br] Script 'services' "Pablo \\\"NatuNobilis\\\"" <natunobilis@××××××××.org>