Startup Problems

Support and queries relating to all previous versions of ZoneMinder
Locked
joky
Posts: 11
Joined: Sun Feb 12, 2006 9:38 am

Startup Problems

Post by joky »

Hi,

I've got ZM running on my machine and just test it with a simple old usb-quickcam. Installation was easy on gentoo, cause it was masked i tried it by the provided sourcecode from this site. After adapting the bash script to the special init-bash-script needed by gentoo everything should be okay,.. Apache is doing everything quite OK, start&stopping of the daemon works by the web-interface.

BUT, start&stopping of the script via the init script (or directly via zmpkg.pl) doesn't work. The only thing i can see is in /var/log/messages:

Feb 12 11:48:26 fileserver zmpkg[4921]: INF [Command: start]

But it doesn't start the server, no processes are spawn and so on,.. can anyone help me??


Best thanks!!
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Did you use the script from the contributions?
http://www.zoneminder.com/forums/viewto ... ntoo+start

Regards,
Corey
joky
Posts: 11
Joined: Sun Feb 12, 2006 9:38 am

Post by joky »

the perl-script both bash's are based is "zmpkg.pl" wich doesn't work,...

fileserver ~ # /etc/init.d/zm start
* Starting ZoneMinder ... [ !! ]
fileserver ~ # zmpkg.pl start
fileserver ~ #

greets
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Pete M
Posts: 7
Joined: Sun Feb 12, 2006 7:44 pm

Post by Pete M »

joky

I used this init script, found here on the forum

Code: Select all

#!/sbin/runscript
# Start and stop zoneminder (for Gentoo)

opts="start stop status"

depend() {
        use mysql apache2
}

prog=ZoneMinder
ZM_PATH_BIN="/usr/local/bin"
command="$ZM_PATH_BIN/zmpkg.pl"

start() {
        ebegin "Starting $prog"
        $command start
        eend $? "Failed to start $prog"
}
stop() {
        ebegin "Stopping $prog"
        $command stop
        eend $? "Failed to stop $prog"
}
status() {
        result=`$command status`
        if [ "$result" = "running" ]; then
                echo "ZoneMinder is running"
                RETVAL=0
        else
                echo "ZoneMinder is stopped"
                RETVAL=1
        fi
        exit ${RETVAL}
}
And the only other gotcha is you have to give your user 'apache' shell access

Before you try the init script stop zoneminder from your web interface else once again it will fail

Hope this helps

Pete
smirks
Posts: 2
Joined: Mon May 22, 2006 9:32 pm

Post by smirks »

quick question about giving apache shell access...could this be a possible security risk? Just now starting to look at things from a secure point of view...so I'm probably being way too cautious...but just wanted to see what others think. Thanks~
smirks
Posts: 2
Joined: Mon May 22, 2006 9:32 pm

Post by smirks »

Ok I've done some research and it is a security issue...

sooo..What about updating coreutils?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

If you have sudo then you should not have to give apache shell access as far as I know.
Phil
Locked