LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   start server at boot in gentoo? (https://www.linuxquestions.org/questions/linux-newbie-8/start-server-at-boot-in-gentoo-264152/)

snipes420 12-08-2004 03:21 PM

start server at boot in gentoo?
 
In linux I've always had problems getting servers and stuff to start at boot, unless installed using apt-get in debian or pkg_add in freebsd, because they help you with it.
I prefer the XAMPP approach because using emerge actually compiles everything and the XBox not a very powerful machine, so its a time thing.
I have a XAMPP server running on GentooX and I cant get it to start at boot.
These commands are to start and stop it
Code:

/opt/lampp/lampp start
/opt/lampp/lampp stop

The script "lampp" can be moved and run from anyware as long as its by root.
I tried to copy the script to /etc/init.d/ and run
Code:

rc-update add lampp default
It seemed like a good idea from what i had read,
But I'm afraid I don't know exactly what I'm doing.
Can someone help me write an init script that works?

Edit:I got this so far
Code:

#!/sbin/runscript

depend() {

}

start() {
  ebegin "Starting XAMPP"
  start-stop-daemon --start --quiet --exec /opt/lampp/lamppstart
  eend $?
}

and the lamppstart is a executable file with this in it (I can run it directly and it works)
Code:

exec lampp start
still not working:(

snipes420 12-08-2004 08:26 PM

Horray! I got it.

I added this line to my /etc/conf.d/local.start file

Code:

/opt/lampp/lampp start
and it works great.

I found it at the Xampp forums which I hadn't seen til tonight. XAMPP Forums


All times are GMT -5. The time now is 05:41 AM.