Re: [gentoo-user] customized init script
On 23.02.2010 09:41, Kaushal Shriyan wrote: * Starting ScriptRunner ... /sbin/start-stop-daemon: Unable to start /usr/local/scriptrunner/bin/startup.sh: Exec format error (Exec format error)[ ok ] Looks like your startup.sh is not an executable. As I assume startup.sh is a shell script. So it has to use #!/bin/bash as its first line and has to be marked executable (at least chmod u+rx startup.sh).
Re: [gentoo-user] customized init script
Kaushal Shriyan wrote: Hi, I have a customized script. hosta# /etc/init.d/scriptrunner start * Starting ScriptRunner ... /sbin/start-stop-daemon: Unable to start /usr/local/scriptrunner/bin/startup.sh: Exec format error (Exec format error)[ ok ] hosta# My customized script is as below #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/5.0.27/tomcat.init,v 1.3 2004/10/08 13:38:08 axxo Exp $ start() { ebegin Starting ScriptRunner start-stop-daemon --start --exec /usr/local/scriptrunner/bin/startup.sh sleep 5 eend $? } stop() { ebegin Stopping ScriptRunner start-stop-daemon --stop --exec /usr/local/scriptrunner/bin/shutdown.sh sleep 5 eend $? } Please suggest/guide Thanks, Kaushal Looks like startup.sh is invalid. Perhaps check what 'file /usr/local/scriptrunner/bin/startup.sh' returns. Amit
Re: [gentoo-user] customized init script
On Tuesday 23 February 2010 08:41:20 Kaushal Shriyan wrote: /usr/local/scriptrunner/bin/startup.sh: Exec format error When I've got that error it's been because I'd tried to chroot from a 32-bit system into a 64-bit, or vice versa. Naturally, one width of bash won't run on an other-width system. I don't know how this helps you, but it's all I can offer. :-( -- Rgds Peter.
Re: [gentoo-user] customized init script
On 23 Feb 2010, at 09:18, hb-...@web.de wrote: On 23.02.2010 09:41, Kaushal Shriyan wrote: * Starting ScriptRunner ... /sbin/start-stop-daemon: Unable to start /usr/local/scriptrunner/bin/startup.sh: Exec format error (Exec format error)[ ok ] Looks like your startup.sh is not an executable. As I assume startup.sh is a shell script. So it has to use #!/bin/bash as its first line Suggest you run `head -n 1 /etc/init.d/* | grep runscript` and compare with the script the OP posted. Stroller.