You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by Vanja Petreski <vp...@gmail.com> on 2007/10/23 14:28:07 UTC

Gentoo Linux init.d script?

Hello Continuum users,

I  installed continuum  1.1-beta-3 on  my Gentoo box and made sym link:

ln -s /opt/continuum-1.1-beta-3/bin/linux-x86-32/run.sh
/etc/init.d/continuum

Now, I can successfully start and stop continuum by hand:

/etc/init.d/continuum start
/etc/init.d/continuum stop

But, when system is booting, I only get "Starting Apache Continuum" and I
can't access web application.

Btw, Gentoo init scripts are little specific..

Any help?

Thanx,
Vanja

Re: Gentoo Linux init.d script?

Posted by Hilco Wijbenga <hi...@gmail.com>.
I've created an init script for Gentoo that seems to work.

#!/sbin/runscript

depend() {
        need net localmount
        after bootmisc
}

start() {
        ebegin "Starting Continuum"
        start-stop-daemon --background --make-pidfile --pidfile
/var/run/continuum.pid --chuid apache --name java --start --exec
/YOUR_DIR/continuum/bin/plexus.sh
        eend $?
}

stop() {
        ebegin "Stopping Continuum"
        start-stop-daemon --stop --pidfile /var/run/continuum.pid
        eend $?
}

Give it a try and let me know if it works.

[DISCLAIMER] I'm by no means a Gentoo expert, just a fairly
experienced user. This seems to work, I'm not saying this is the best
way to do it.

Re: Gentoo Linux init.d script?

Posted by Vanja Petreski <vp...@gmail.com>.
Definitely not Gentoo init script...

V

On 10/24/07, Hilco Wijbenga <hi...@gmail.com> wrote:
>
> Oops...
>
> I just realised I have changed the OS on my Maven/Continuum/Archiva
> box ... it's no longer Gentoo but CentOS (the company uses RedHat by
> default). So the init script I sent is for CentOS, not Gentoo.
>
> My apologies, I'll try to create an init script for Gentoo.
>
> Cheers,
> Hilco
>

Re: Gentoo Linux init.d script?

Posted by Hilco Wijbenga <hi...@gmail.com>.
Oops...

I just realised I have changed the OS on my Maven/Continuum/Archiva
box ... it's no longer Gentoo but CentOS (the company uses RedHat by
default). So the init script I sent is for CentOS, not Gentoo.

My apologies, I'll try to create an init script for Gentoo.

Cheers,
Hilco

Re: Gentoo Linux init.d script?

Posted by Emmanuel Venisse <em...@venisse.net>.
http://people.apache.org/~evenisse/continuum_1.1_site/documentation/1_1/installation/standalone.html#In_a_Gentoo_system

I think we need more informations like the chkconfig command or something else. Can you provide the text or create a patch?
The source of this page is there: http://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-site/src/site/apt/documentation/1_1/installation/standalone.apt

Emmanuel

Hilco Wijbenga a écrit :
> On 10/23/07, Emmanuel Venisse <em...@venisse.net> wrote:
>> I'll create a page for the site with your script. you'll can review it?
> 
> Sure, just let me know where and when.
> 
> 


Re: Gentoo Linux init.d script?

Posted by Hilco Wijbenga <hi...@gmail.com>.
On 10/23/07, Emmanuel Venisse <em...@venisse.net> wrote:
> I'll create a page for the site with your script. you'll can review it?

Sure, just let me know where and when.

Re: Gentoo Linux init.d script?

Posted by Emmanuel Venisse <em...@venisse.net>.
Hilco,

I'll create a page for the site with your script. you'll can review it?

Emmanuel

Hilco Wijbenga a écrit :
> Hi Vanja,
> 
> I ran into the same problem.
> 
> On 10/23/07, Vanja Petreski <vp...@gmail.com> wrote:
>> ln -s /opt/continuum-1.1-beta-3/bin/linux-x86-32/run.sh
>> /etc/init.d/continuum
> 
> The run.sh script is not a Gentoo init script.
> 
>> Now, I can successfully start and stop continuum by hand:
>>
>> /etc/init.d/continuum start
>> /etc/init.d/continuum stop
> 
> :-) Yep, this all works.
> 
>> But, when system is booting, I only get "Starting Apache Continuum" and I
>> can't access web application.
> 
> Indeed. I've created Gentoo init scripts for both Archiva and
> Continuum. (You'll need to edit it to fix the hardcoded path.)
> 
> #!/bin/sh
> 
> # chkconfig: 2345 20 80
> # description: Starts and stops continuum.
> 
> # Source function library.
> . /etc/rc.d/init.d/functions
> 
> function start() {
>         echo -n "Starting continuum: "
>         daemon --user apache /YOUR_DIR/bin/linux-x86-32/run.sh start
>> /dev/null 2>&1
>         echo_success
>         echo
> }
> 
> function stop() {
>         echo -n "Stopping continuum: "
>         daemon --user apache /YOUR_DIR/bin/linux-x86-32/run.sh stop
>> /dev/null 2>&1
>         echo_success
>         echo
> }
> 
> # See how we were called.
> case "$1" in
>         start)
>                 start
>                 ;;
>         stop)
>                 stop
>                 ;;
>         status)
>                 ;;
>         restart)
>                 stop
>                 start
>                 ;;
>         condrestart)
>                 ;;
>         reload)
>                 ;;
>         *)
>                 echo "Usage: $0 {start|stop|status|restart|condrestart|reload}"
>                 ;;
> esac
> exit $RETVAL
> 
>> Any help?
> 
> HTH,
> Hilco
> 
> 


Re: Gentoo Linux init.d script?

Posted by Hilco Wijbenga <hi...@gmail.com>.
Hi Vanja,

I ran into the same problem.

On 10/23/07, Vanja Petreski <vp...@gmail.com> wrote:
> ln -s /opt/continuum-1.1-beta-3/bin/linux-x86-32/run.sh
> /etc/init.d/continuum

The run.sh script is not a Gentoo init script.

> Now, I can successfully start and stop continuum by hand:
>
> /etc/init.d/continuum start
> /etc/init.d/continuum stop

:-) Yep, this all works.

> But, when system is booting, I only get "Starting Apache Continuum" and I
> can't access web application.

Indeed. I've created Gentoo init scripts for both Archiva and
Continuum. (You'll need to edit it to fix the hardcoded path.)

#!/bin/sh

# chkconfig: 2345 20 80
# description: Starts and stops continuum.

# Source function library.
. /etc/rc.d/init.d/functions

function start() {
        echo -n "Starting continuum: "
        daemon --user apache /YOUR_DIR/bin/linux-x86-32/run.sh start
>/dev/null 2>&1
        echo_success
        echo
}

function stop() {
        echo -n "Stopping continuum: "
        daemon --user apache /YOUR_DIR/bin/linux-x86-32/run.sh stop
>/dev/null 2>&1
        echo_success
        echo
}

# See how we were called.
case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        status)
                ;;
        restart)
                stop
                start
                ;;
        condrestart)
                ;;
        reload)
                ;;
        *)
                echo "Usage: $0 {start|stop|status|restart|condrestart|reload}"
                ;;
esac
exit $RETVAL

> Any help?

HTH,
Hilco