[arch-general] Tool to stop and start services? (Don't Panic)
Hussam Al-Tayeb
ht990332 at gmail.com
Thu May 22 13:39:42 EDT 2008
On Thu, 2008-05-22 at 09:09 -0700, Thayer Williams wrote:
> On 5/22/08, Travis Willard <travis at archlinux.org> wrote:
> > On Thu, May 22, 2008 at 11:07 AM, Nigel Henry
> > <cave.dnb2m97pp at aliceadsl.fr> wrote:
> > > On my Fedora installs there is a GUI for stopping and starting services, and
> > > also the option of using chkconfig on the CLI. On my Debian installs, I
> > > installed sysv-rc-conf, which runs on the CLI, and allows you to stop and
> > > start services.
> > >
> > > Is there anything similar that I could use on my Archlinux install?
> > >
> > > Thanks for any help.
> >
> >
> > I can't recall any such tool offhand, though the discussion certainly
> > has come up before. What's wrong with /etc/rc.d/service stop and
> > /etc/rc.d/service start?
>
> I would have to side with Travis here. In case it's just too much
> hassle to type, you can always add some bash functions to make it even
> simpler. Here's what I've got in ~/.bashrc (it's based off someone
> else's example from the forums...):
>
> # start, stop, restart, reload - simple daemon management
> # usage: start <daemon-name>
> start()
> {
> for arg in $*; do
> sudo /etc/rc.d/$arg start
> done
> }
> stop()
> {
> for arg in $*; do
> sudo /etc/rc.d/$arg stop
> done
> }
> restart()
> {
> for arg in $*; do
> sudo /etc/rc.d/$arg restart
> done
> }
> reload() {
> for arg in $*; do
> sudo /etc/rc.d/$arg reload
> done
> }
>
Someone wrote this a while earlier http://pastebin.com/d50be4205
it also checks whether a service is already running or not.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2143 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/arch-general/attachments/20080522/e317b71f/attachment.bin>
More information about the arch-general
mailing list