[arch-general] Tool to stop and start services? (Don't Panic)

David Rosenstrauch darose at darose.net
Thu May 22 12:35:36 EDT 2008


Thayer Williams wrote:
> 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
> }

As I originally started on RedHat, and so am a bit partial to the 
"service foo start" syntax, I always put the following script into 
/root/bin on my Arch boxes:

[darose at davidrlin ~]$ sudo cat /root/bin/service
/etc/rc.d/$*

DR




More information about the arch-general mailing list