You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@openmeetings.apache.org by Philippe Dhont <Dh...@vlaamsoogpunt.be> on 2013/03/15 09:20:31 UTC
centos startup script with daemon
Hi,
I Have OM2 installed (on Centos 6.4) and I have a script but it keeps OM running on the foregrond.
Does someone has a script for centos which starts a boot in the background ?
Thanks,
Philippe
<a href="http://www.ziezovlaanderen.be"><img src="http://www.vopserver.be/mailfooters/ziezovlaanderen.jpg" alt="Ziezo Vlaanderen" width="626" height="78" border="0" longdesc="http://www.ziezovlaanderen.be" /></a><a href="http://www.ikwilhelpen.be/ikwilhelpen/iwh/action.php?aid=1063&lang=nl"><img src="http://www.vopserver.be/mailfooters/schenkonline.jpg" alt="Schenk Online" width="135" height="77" border="0" longdesc="http://www.ikwilhelpen.be/ikwilhelpen/iwh/org.php?oid=50" /></a>
RE: centos startup script with daemon
Posted by Philippe Dhont <Dh...@vlaamsoogpunt.be>.
Hi,
Thanks for the reply, where can I download the start-stop-daemon ?
Ph.
From: Maxim Solodovnik [mailto:solomax666@gmail.com]
Sent: vrijdag 15 maart 2013 10:58
To: Openmeetings user-list
Subject: Re: centos startup script with daemon
While installing on CentOS I did the following:
1) install start-stop-daemon (via sources)
2) took Ubuntu script and install it via "chkconfig --level 35 red5 on"
On Fri, Mar 15, 2013 at 5:45 PM, Alvaro <zu...@gmail.com> wrote:
Hi Philippe,
In Debian it is so:
update-rc.d red5 defaults
...this is if the OM run script is called red5.
If your is a different name change it.
Is it you mean?
Regards
..............
El vie, 15-03-2013 a las 09:20 +0100, Philippe Dhont escribió:
> Hi,
>
>
>
> I Have OM2 installed (on Centos 6.4) and I have a script but it keeps
> OM running on the foregrond.
>
> Does someone has a script for centos which starts a boot in the
> background ?
>
> Thanks,
>
> Philippe
>
>
>
>
> Ziezo VlaanderenSchenk Online
--
WBR
Maxim aka solomax
<a href="http://www.ziezovlaanderen.be"><img src="http://www.vopserver.be/mailfooters/ziezovlaanderen.jpg" alt="Ziezo Vlaanderen" width="626" height="78" border="0" longdesc="http://www.ziezovlaanderen.be" /></a><a href="http://www.ikwilhelpen.be/ikwilhelpen/iwh/action.php?aid=1063&lang=nl"><img src="http://www.vopserver.be/mailfooters/schenkonline.jpg" alt="Schenk Online" width="135" height="77" border="0" longdesc="http://www.ikwilhelpen.be/ikwilhelpen/iwh/org.php?oid=50" /></a>
Re: centos startup script with daemon
Posted by Vital Kutsyv <vi...@gmail.com>.
Hi! I use fedora
First I made a script. Then put it in /etc/init.d/. Then run *chkconfig
--add red5*, then *chkconfig --level 5 **red5 on* ... all works
2013/3/18 Philippe Dhont <Dh...@vlaamsoogpunt.be>
> Hi,
>
> I did the following (for centos 6.4):
> 1) install start-stop daemon:
>
> wget -c
> http://cloudman.rumahweb.com/wp-content/uploads/2011/10/dpkg_1.14.31.tar.gz
>
> tar -zxvf dpkg_1.14.31.tar.gz
> cd dpkg-1.14.31/
> ./configure
> make
> cd utils
> make install
>
> info from site:
> http://blog.godson.in/2012/08/how-to-fix-start-stop-daemon-command.html
>
> 2) then I placed a startup script in /etc/init.d/
> The name of the script is "red5" (don't know where I got it, somewhere on
> the internet) but the following is the script as it is now on my centos:
> #! /bin/sh
> #
> # red5 red5 initscript
> #
> # Author: Simon Eisenmann .
> #
> set -e
> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
> DESC="Red5 flash streaming server"
> NAME=red5
> RED5_HOME=/opt/openmeetings
> DAEMON=$RED5_HOME/$NAME.sh
> PIDFILE=/var/run/$NAME.pid
> SCRIPTNAME=/etc/init.d/$NAME
> # Gracefully exit if the package has been removed.
> test -x $DAEMON || exit 0
> # Read config file if it is present.
> if [ -r /etc/default/$NAME ]
> then
> . /etc/default/$NAME
> fi
> #
> # Function that starts the daemon/service.
> #
> d_start() {
> start-stop-daemon --start -c nobody --pidfile $PIDFILE --chdir
> $RED5_HOME --background --make-pidfile --exec $DAEMON
> }
> #
> # Function that stops the daemon/service.
> #
> d_stop() {
> start-stop-daemon --stop --quiet --pidfile $PIDFILE --name java
> rm -f $PIDFILE
> }
> case "$1" in
> start)
> echo -n "Starting $DESC: $NAME"
> d_start
> echo "."
> ;;
> stop)
> echo -n "Stopping $DESC: $NAME"
> d_stop
> echo "."
> ;;
>
> restart|force-reload)
> echo -n "Restarting $DESC: $NAME"
> d_stop
> sleep 1
> d_start
> echo "."
> ;;
>
> *)
> echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
> exit 1
> ;;
>
> esac
> exit 0
> exit 0
>
>
>
> 3) I placed the following in my /etc/rc.local:
> /etc/init.d/red5 start
>
>
> That's it, I can stop it and start it.
>
>
>
> From: Kamran Asif [mailto:kamranasif@gmail.com]
> Sent: zaterdag 16 maart 2013 7:51
> To: user@openmeetings.apache.org
> Subject: Re: centos startup script with daemon
>
> Hi there,
> Can tell us what you have found and how it works, please
> write the sulotion of your giving problem. I think it will be great help
> for all of the people in mailig list.
>
> thanks
>
>
>
> On Fri, Mar 15, 2013 at 5:32 PM, Philippe Dhont <
> Dhont.Philippe@vlaamsoogpunt.be> wrote:
> I found it, works now.
> Thanks!
>
> From: Maxim Solodovnik [mailto:solomax666@gmail.com]
> Sent: vrijdag 15 maart 2013 10:58
> To: Openmeetings user-list
> Subject: Re: centos startup script with daemon
> While installing on CentOS I did the following:
> 1) install start-stop-daemon (via sources)
> 2) took Ubuntu script and install it via "chkconfig --level 35 red5 on"
>
> On Fri, Mar 15, 2013 at 5:45 PM, Alvaro <zu...@gmail.com> wrote:
> Hi Philippe,
>
> In Debian it is so:
>
> update-rc.d red5 defaults
>
> ...this is if the OM run script is called red5.
> If your is a different name change it.
>
> Is it you mean?
>
> Regards
>
> ..............
>
>
> El vie, 15-03-2013 a las 09:20 +0100, Philippe Dhont escribió:
> > Hi,
> >
> >
> >
> > I Have OM2 installed (on Centos 6.4) and I have a script but it keeps
> > OM running on the foregrond.
> >
> > Does someone has a script for centos which starts a boot in the
> > background ?
> >
> > Thanks,
> >
> > Philippe
> >
> >
> >
> >
> > Ziezo VlaanderenSchenk Online
>
>
>
>
>
> --
> WBR
> Maxim aka solomax
>
> <a href="http://www.ziezovlaanderen.be"><img src="
> http://www.vopserver.be/mailfooters/ziezovlaanderen.jpg" alt="Ziezo
> Vlaanderen" width="626" height="78" border="0" longdesc="
> http://www.ziezovlaanderen.be" /></a><a href="
> http://www.ikwilhelpen.be/ikwilhelpen/iwh/action.php?aid=1063&lang=nl"><img
> src="http://www.vopserver.be/mailfooters/schenkonline.jpg" alt="Schenk
> Online" width="135" height="77" border="0" longdesc="
> http://www.ikwilhelpen.be/ikwilhelpen/iwh/org.php?oid=50" /></a>
>
>
>
> <a href="http://www.ziezovlaanderen.be"><img src="
> http://www.vopserver.be/mailfooters/ziezovlaanderen.jpg" alt="Ziezo
> Vlaanderen" width="626" height="78" border="0" longdesc="
> http://www.ziezovlaanderen.be" /></a><a href="
> http://www.ikwilhelpen.be/ikwilhelpen/iwh/action.php?aid=1063&lang=nl"><img
> src="http://www.vopserver.be/mailfooters/schenkonline.jpg" alt="Schenk
> Online" width="135" height="77" border="0" longdesc="
> http://www.ikwilhelpen.be/ikwilhelpen/iwh/org.php?oid=50" /></a>
>
> ------------------------------------------------------
> Powered by Xeams. Visit xeams.com for more information
> ------------------------------------------------------
>
RE: centos startup script with daemon
Posted by Philippe Dhont <Dh...@vlaamsoogpunt.be>.
Hi,
I did the following (for centos 6.4):
1) install start-stop daemon:
wget -c http://cloudman.rumahweb.com/wp-content/uploads/2011/10/dpkg_1.14.31.tar.gz
tar -zxvf dpkg_1.14.31.tar.gz
cd dpkg-1.14.31/
./configure
make
cd utils
make install
info from site:
http://blog.godson.in/2012/08/how-to-fix-start-stop-daemon-command.html
2) then I placed a startup script in /etc/init.d/
The name of the script is "red5" (don't know where I got it, somewhere on the internet) but the following is the script as it is now on my centos:
#! /bin/sh
#
# red5 red5 initscript
#
# Author: Simon Eisenmann .
#
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="Red5 flash streaming server"
NAME=red5
RED5_HOME=/opt/openmeetings
DAEMON=$RED5_HOME/$NAME.sh
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
# Read config file if it is present.
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
#
# Function that starts the daemon/service.
#
d_start() {
start-stop-daemon --start -c nobody --pidfile $PIDFILE --chdir $RED5_HOME --background --make-pidfile --exec $DAEMON
}
#
# Function that stops the daemon/service.
#
d_stop() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE --name java
rm -f $PIDFILE
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
exit 0
3) I placed the following in my /etc/rc.local:
/etc/init.d/red5 start
That's it, I can stop it and start it.
From: Kamran Asif [mailto:kamranasif@gmail.com]
Sent: zaterdag 16 maart 2013 7:51
To: user@openmeetings.apache.org
Subject: Re: centos startup script with daemon
Hi there,
Can tell us what you have found and how it works, please write the sulotion of your giving problem. I think it will be great help for all of the people in mailig list.
thanks
On Fri, Mar 15, 2013 at 5:32 PM, Philippe Dhont <Dh...@vlaamsoogpunt.be> wrote:
I found it, works now.
Thanks!
From: Maxim Solodovnik [mailto:solomax666@gmail.com]
Sent: vrijdag 15 maart 2013 10:58
To: Openmeetings user-list
Subject: Re: centos startup script with daemon
While installing on CentOS I did the following:
1) install start-stop-daemon (via sources)
2) took Ubuntu script and install it via "chkconfig --level 35 red5 on"
On Fri, Mar 15, 2013 at 5:45 PM, Alvaro <zu...@gmail.com> wrote:
Hi Philippe,
In Debian it is so:
update-rc.d red5 defaults
...this is if the OM run script is called red5.
If your is a different name change it.
Is it you mean?
Regards
..............
El vie, 15-03-2013 a las 09:20 +0100, Philippe Dhont escribió:
> Hi,
>
>
>
> I Have OM2 installed (on Centos 6.4) and I have a script but it keeps
> OM running on the foregrond.
>
> Does someone has a script for centos which starts a boot in the
> background ?
>
> Thanks,
>
> Philippe
>
>
>
>
> Ziezo VlaanderenSchenk Online
--
WBR
Maxim aka solomax
<a href="http://www.ziezovlaanderen.be"><img src="http://www.vopserver.be/mailfooters/ziezovlaanderen.jpg" alt="Ziezo Vlaanderen" width="626" height="78" border="0" longdesc="http://www.ziezovlaanderen.be" /></a><a href="http://www.ikwilhelpen.be/ikwilhelpen/iwh/action.php?aid=1063&lang=nl"><img src="http://www.vopserver.be/mailfooters/schenkonline.jpg" alt="Schenk Online" width="135" height="77" border="0" longdesc="http://www.ikwilhelpen.be/ikwilhelpen/iwh/org.php?oid=50" /></a>
<a href="http://www.ziezovlaanderen.be"><img src="http://www.vopserver.be/mailfooters/ziezovlaanderen.jpg" alt="Ziezo Vlaanderen" width="626" height="78" border="0" longdesc="http://www.ziezovlaanderen.be" /></a><a href="http://www.ikwilhelpen.be/ikwilhelpen/iwh/action.php?aid=1063&lang=nl"><img src="http://www.vopserver.be/mailfooters/schenkonline.jpg" alt="Schenk Online" width="135" height="77" border="0" longdesc="http://www.ikwilhelpen.be/ikwilhelpen/iwh/org.php?oid=50" /></a>
------------------------------------------------------
Powered by Xeams. Visit xeams.com for more information
------------------------------------------------------
Re: centos startup script with daemon
Posted by Kamran Asif <ka...@gmail.com>.
Hi there,
Can tell us what you have found and how it works, please
write the sulotion of your giving problem. I think it will be great help
for all of the people in mailig list.
thanks
On Fri, Mar 15, 2013 at 5:32 PM, Philippe Dhont <
Dhont.Philippe@vlaamsoogpunt.be> wrote:
> I found it, works now.
> Thanks!
>
> From: Maxim Solodovnik [mailto:solomax666@gmail.com]
> Sent: vrijdag 15 maart 2013 10:58
> To: Openmeetings user-list
> Subject: Re: centos startup script with daemon
>
> While installing on CentOS I did the following:
> 1) install start-stop-daemon (via sources)
> 2) took Ubuntu script and install it via "chkconfig --level 35 red5 on"
>
> On Fri, Mar 15, 2013 at 5:45 PM, Alvaro <zu...@gmail.com> wrote:
> Hi Philippe,
>
> In Debian it is so:
>
> update-rc.d red5 defaults
>
> ...this is if the OM run script is called red5.
> If your is a different name change it.
>
> Is it you mean?
>
> Regards
>
> ..............
>
>
> El vie, 15-03-2013 a las 09:20 +0100, Philippe Dhont escribió:
> > Hi,
> >
> >
> >
> > I Have OM2 installed (on Centos 6.4) and I have a script but it keeps
> > OM running on the foregrond.
> >
> > Does someone has a script for centos which starts a boot in the
> > background ?
> >
> > Thanks,
> >
> > Philippe
> >
> >
> >
> >
> > Ziezo VlaanderenSchenk Online
>
>
>
>
>
> --
> WBR
> Maxim aka solomax
>
>
> <a href="http://www.ziezovlaanderen.be"><img src="
> http://www.vopserver.be/mailfooters/ziezovlaanderen.jpg" alt="Ziezo
> Vlaanderen" width="626" height="78" border="0" longdesc="
> http://www.ziezovlaanderen.be" /></a><a href="
> http://www.ikwilhelpen.be/ikwilhelpen/iwh/action.php?aid=1063&lang=nl"><img
> src="http://www.vopserver.be/mailfooters/schenkonline.jpg" alt="Schenk
> Online" width="135" height="77" border="0" longdesc="
> http://www.ikwilhelpen.be/ikwilhelpen/iwh/org.php?oid=50" /></a>
>
RE: centos startup script with daemon
Posted by Philippe Dhont <Dh...@vlaamsoogpunt.be>.
I found it, works now.
Thanks!
From: Maxim Solodovnik [mailto:solomax666@gmail.com]
Sent: vrijdag 15 maart 2013 10:58
To: Openmeetings user-list
Subject: Re: centos startup script with daemon
While installing on CentOS I did the following:
1) install start-stop-daemon (via sources)
2) took Ubuntu script and install it via "chkconfig --level 35 red5 on"
On Fri, Mar 15, 2013 at 5:45 PM, Alvaro <zu...@gmail.com> wrote:
Hi Philippe,
In Debian it is so:
update-rc.d red5 defaults
...this is if the OM run script is called red5.
If your is a different name change it.
Is it you mean?
Regards
..............
El vie, 15-03-2013 a las 09:20 +0100, Philippe Dhont escribió:
> Hi,
>
>
>
> I Have OM2 installed (on Centos 6.4) and I have a script but it keeps
> OM running on the foregrond.
>
> Does someone has a script for centos which starts a boot in the
> background ?
>
> Thanks,
>
> Philippe
>
>
>
>
> Ziezo VlaanderenSchenk Online
--
WBR
Maxim aka solomax
<a href="http://www.ziezovlaanderen.be"><img src="http://www.vopserver.be/mailfooters/ziezovlaanderen.jpg" alt="Ziezo Vlaanderen" width="626" height="78" border="0" longdesc="http://www.ziezovlaanderen.be" /></a><a href="http://www.ikwilhelpen.be/ikwilhelpen/iwh/action.php?aid=1063&lang=nl"><img src="http://www.vopserver.be/mailfooters/schenkonline.jpg" alt="Schenk Online" width="135" height="77" border="0" longdesc="http://www.ikwilhelpen.be/ikwilhelpen/iwh/org.php?oid=50" /></a>
Re: centos startup script with daemon
Posted by Maxim Solodovnik <so...@gmail.com>.
While installing on CentOS I did the following:
1) install start-stop-daemon (via sources)
2) took Ubuntu script and install it via "chkconfig --level 35 red5 on"
On Fri, Mar 15, 2013 at 5:45 PM, Alvaro <zu...@gmail.com> wrote:
> Hi Philippe,
>
> In Debian it is so:
>
> update-rc.d red5 defaults
>
> ...this is if the OM run script is called red5.
> If your is a different name change it.
>
> Is it you mean?
>
> Regards
>
> ..............
>
>
> El vie, 15-03-2013 a las 09:20 +0100, Philippe Dhont escribió:
> > Hi,
> >
> >
> >
> > I Have OM2 installed (on Centos 6.4) and I have a script but it keeps
> > OM running on the foregrond.
> >
> > Does someone has a script for centos which starts a boot in the
> > background ?
> >
> > Thanks,
> >
> > Philippe
> >
> >
> >
> >
> > Ziezo VlaanderenSchenk Online
>
>
>
--
WBR
Maxim aka solomax
Re: centos startup script with daemon
Posted by Alvaro <zu...@gmail.com>.
Hi Philippe,
In Debian it is so:
update-rc.d red5 defaults
...this is if the OM run script is called red5.
If your is a different name change it.
Is it you mean?
Regards
..............
El vie, 15-03-2013 a las 09:20 +0100, Philippe Dhont escribió:
> Hi,
>
>
>
> I Have OM2 installed (on Centos 6.4) and I have a script but it keeps
> OM running on the foregrond.
>
> Does someone has a script for centos which starts a boot in the
> background ?
>
> Thanks,
>
> Philippe
>
>
>
>
> Ziezo VlaanderenSchenk Online