Ticket #171 (closed enhancement: wontfix)

Opened 16 months ago

Last modified 15 months ago

Create a service tool similar to redhat service

Reported by: joseph_d_stein@yahoo.com Owned by: roy
Priority: minor Milestone:
Component: rc Version: 0.4
Keywords: Cc:

Description

I saw on the form that Redhat had a command call service to work with services an though it would be nice if openrc had one to so i create this short script named it /usr/bin/service and made it executable.

#!/bin/bash
if [ "$1" = "list" ]; then

ls --color /etc/init.d/$2

elif [ "$1" = "help" ] [ -z "$1" ]; then

echo "service- a tool to make work with service a little easier "
echo
echo "service- usage: service <name of service> <start,restart,zap, etc> or "
echo "service- usage: service <command> <parm1> <parm2> "
echo
echo "comands:"
echo
echo "add: tell rc-update to add <parm1> to runlevel <parm2> "
echo "del: tell rc-update to del <parm1> on runlevel <parm2>"
echo "show: tell rc-update to show service started on boot"
echo "list: uses the ls <parm1> command to list all service in /etc/init.d"

echo "find: uses the grep command to find service started on boot that matches <parm1>"

echo "help: displays this messages "
echo

elif [ "$1" = "add" ]; then

rc-update add $2 $3

elif [ "$1" = "show" ]; then

rc-update show

elif [ "$1" = "del" ]; then

rc-update del $2 $3

elif [ "$1" = "find" ]; then

rc-update show |grep -i $2

else

/etc/init.d/"$1" "$2"

fi

I think it make it a little nice then saying

/etc/init.d/service name start(or what ever)

and you might have use for it.
Could you add this to openrc or do you think it don't belong here?

Change History

comment:1 Changed 16 months ago by roy

OpenRC already has the rc-service command.

rc-service name start

What would service do any differently?

comment:2 Changed 15 months ago by roy

  • Status changed from new to closed
  • Resolution set to wontfix

rc-service works fine here

Note: See TracTickets for help on using tickets.