Bug 85564 - ircd-hybrid init script
Summary: ircd-hybrid init script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-01 11:30 UTC by hr
Modified: 2005-09-16 09:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hr 2005-09-01 11:30:14 UTC
	The actual init script of ircd-hybrid looks really old fashioned, it needs a rewrite to be compatible with the rc.d system.

Fix: 

The following file is a new init script that is using the rc.d facilities.

--- cut here --- file: /usr/ports/irc/ircd-hybrid/files/ircd-hybrid.sh
#!/bin/sh

# PROVIDE: ircd-hybrid
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown

# To get ircd-hybrid enabled at boot, add the following lines to /etc/rc.conf :
# ircd_hybrid_enable (bool):    Set to "NO" by default.
#                               Set it to "YES" to enable ircd-hybrid.

. /etc/rc.subr

name="ircd_hybrid"
rcvar=`set_rcvar`

command=/usr/local/bin/ircd
pidfile=/var/run/ircd.pid
required_files=/usr/local/etc/ircd-hybrid/ircd.conf

start_precmd=pid_touch
stop_postcmd=pid_rm


[ -z "$ircd_hybrid_enable" ] && ircd_hybrid_enable=NO
[ -z "$ircd_hybrid_user" ] && ircd_hybrid_user=ircd

load_rc_config $name

pid_touch ()
{
    touch $pidfile
    chown $ircd_hybrid_user $pidfile
}

pid_rm ()
{
    rm $pidfile
}

run_rc_command "$1"
--- cut here ---
How-To-Repeat: 	Just look into /usr/ports/irc/ircd-hybrid/files/ircd-hybrid.sh
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2005-09-04 14:03:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Take; related to ports/84777
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2005-09-16 09:22:59 UTC
State Changed
From-To: open->closed

Committed, thanks!