Creating chrooting init scripts in gentoo

just create something similar to this:

start() {
ebegin “Starting ${CHROOT:+chrooted }dhcpd”
start-stop-daemon –start –quiet –exec /usr/sbin/dhcpd \
— -pf /var/run/dhcp/dhcpd.pid \
-user dhcp -group dhcp ${DHCPD_OPTS} \
${CHROOT:+-chroot ${CHROOT}} ${IFACE}
eend $?
}

stop() {
ebegin “Stopping dhcpd”
start-stop-daemon –stop –quiet –pidfile \
“${CHROOT}/var/run/dhcp/dhcpd.pid”
eend $?
}

Dette indlæg blev udgivet i Knowledge Base, Linux, Old Base. Bogmærk permalinket.

Skriv et svar