Page Actions
Wiki Actions
User Actions
Submit This Story

Service structure in /etc/init.d

Here is the basic structure in a Gentoo OpenRC Service:

script

#!/sbin/runscript

depend() {
  need net
}

start() {
ebegin "Starting ADSL"
/usr/sbin/pppoe-start
eend $? "Connection Failed"
}

stop() {
ebegin "Stopping ADSL"
/usr/sbin/pppoe-stop
eend $? "Failed to stop ADSL"
}

Discussion

Enter your comment
 
 
blog/2009/9/service_structure_in_etc_init.d.txt · Last modified: 2010/02/01 09:11 by MeaCulpa     Back to top
Recent changes RSS feed Creative Commons License Powered by PHP Driven by DokuWiki