service init file

Eric Tanguy eric.tanguy at univ-nantes.fr
Tue Jan 3 17:11:09 UTC 2006


For a new package i need to make an init file. I make it (see above).
But the small problem is : when the system boot up the messages from all
starting services are in french whereas for this service is still in
english. Where this come from ?
Thanks
#!/bin/sh
#
# ushare		This shell script takes care of starting and stopping ushare.
#
# chkconfig: - 75 25
# description:	uShare UPnP A/V Media Server.
#

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

OPTIONS=""
prog=ushare
DESC="UPnP A/V Media Server"

[ -r "/etc/ushare.conf" ] && . /etc/ushare.conf
# abort if no shared directory is defined
[ -z "$USHARE_DIR" ] && exit 0


start() {
	echo -n $"Starting $DESC $prog: "
	daemon --user ushare $prog -D
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
}

stop() {
	echo -n $"Stopping $DESC $prog: "
	killproc $prog
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog /var/run/ircd.pid
}

reload() {
	echo -n $"Reloading $DESC $prog: "
	killproc $prog -HUP
	RETVAL=$?
	echo
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	status $prog
	RETVAL=$?
	;;
  restart)
	stop
	start
	;;
  condrestart)
	if [ -f /var/lock/subsys/$prog ]; then
	  stop
	  start
	fi
	;;
  reload)
	reload
	;;
  *)
	echo $"Usage: $prog {start|stop|restart|condrestart|reload|status"
	exit 1
esac

exit $RETVAL







More information about the fedora-extras-list mailing list