Start OpenEMM on system boot

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

rk
Posts: 14
Joined: Fri Nov 10, 2006 5:43 pm
Location: Munich
Contact:

Start OpenEMM on system boot

Post by rk »

Hi folks,

OpenEMM is a really nice software. Up to now, the installation on my fresh opensuse 10.1 system was going fine.

I'm not the Linux crack, so I got some problems getting OpenEMM started on system boot.

could anybody give me a hint how to make this working?


thanks a lot
I appreciate it!
marton
Posts: 36
Joined: Wed Aug 09, 2006 2:51 pm

Post by marton »

for security reasons i wouldn´t do this with root... furthermore you only can start openemm as openemm-user...

if so you should create a startscript for openemm in /etc/init.d/ (works for fedora) just google for some shell script examples and try to build up your own script, chmod the files in the openemm directory and so on...

but to be honest i would try this:
- write a small shell script (which is starting after system boot)
- login as openemm and start the application - within the shell script

this shouldn´t be very difficult, i guess. maybe your can post your shell script here? no prob when it doesn´t work - we can help you with the shell script.

cheerio, marton
rk
Posts: 14
Joined: Fri Nov 10, 2006 5:43 pm
Location: Munich
Contact:

Post by rk »

here's the script, if someone wants to use it:

Code: Select all

#! /bin/sh
#
#
# System startup script for OpenEMM
#
openemmbin=/home/openemm/bin/OpenEMM.sh

case "$1" in
    start)
        echo -n "Starting OpenEMM"
        su - openemm -c "$openemmbin start"
        ;;
    stop)
        su - openemm -c "$openemmbin stop"
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;
esac
RestLessGemini
Posts: 5
Joined: Mon Sep 04, 2006 5:11 pm

Starting OpenEMM at boot

Post by RestLessGemini »

Dear All,

This is what I use to start OpenEMM at boot.

put this line in your /etc/rc.local

su - openemm -c "OpenEMM.sh start"

Save the file.

OpenEMM will start at boot time.

I am using CentOS 4.3 Final Version. This should also work on all RH flavours.

Hope this help.

Regards,

~RestLessGemini
jsmith
Posts: 3
Joined: Fri Sep 04, 2009 4:09 pm
Location: Canton, OH

Post by jsmith »

The original script provided is good, but it's incompatible with chkconfig. Adding a few lines of comments allows it to work. Here's my updated version of the code for /etc/init.d/openemm

Code: Select all

#! /bin/sh
#
# chkconfig: 345 80 20
# description: OpenEMM server
# processname: openemm
#
# System startup script for OpenEMM
#
openemmbin=/home/openemm/bin/OpenEMM.sh

case "$1" in
    start)
        echo -n "Starting OpenEMM"
        su - openemm -c "$openemmbin start"
        ;;
    stop)
        su - openemm -c "$openemmbin stop"
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;
esac
After putting that file in place and making it executable, you can issue commands like

Code: Select all

/sbin/chkconfig --add openemm
/sbin/chkconfig openemm on
to register openemm with chkconfig and then configure it to start automatically on system boot.
Post Reply