These Things Matter to Me
Monday, September 26, 2005
  Service in Novell SUSE/ SLES/ NLD
I keep bumping up against small differences between Linux distros, and it kind of drives me a crazy. For example, I'm spoiled by service in the Redhat distros. You can query the status of any service in /etc/init.d.
# service syslog status
syslogd (pid 2106) is running...
klogd (pid 2110) is running...
# service httpd status
httpd (pid 26830 26829 26828 26827 26826) is running...
#
You can't do that in the Novell distros of Linux (NLD, SLES, SUSE Pro) that I've seen...
Until now! I came across this handy script on Novell's site, that'll let you to enjoy the service experience.
#!/bin/bash
#/usr/sbin/service

if [ $USER != "root" ]
then
echo "Must be in a root login shell to run $0"
exit
fi

if [ $# -lt 2 ]
then
echo "Usage: $0 service_name stop/start/restart/status"
exit
fi

set -e
/etc/init.d/$1 $2
 
Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home
probably a little too much

About
Linux sysadmin. I cry when make fails. And during the Oscars. Every year.
Contact
andy: andiacts [at] gmail.com
Archives
September 2005 / October 2005 / November 2005 / December 2005 / January 2006 / February 2006 / March 2006 / April 2006 / May 2006 / June 2006 / July 2006 / August 2006 / November 2006 / December 2006 / January 2007 / February 2007 / March 2007 / April 2007 / May 2007 / June 2007 / July 2007 / August 2007 / September 2007 / October 2007 / November 2007 / December 2007 / January 2008 / February 2008 / March 2008 / April 2008 / May 2008 / June 2008 / July 2008 / August 2008 / September 2008 / January 2009 / February 2009 /




Powered by Blogger

Subscribe to
Posts [Atom]