* [gentoo-user] customized init script
@ 2010-02-23 8:41 Kaushal Shriyan
2010-02-23 9:18 ` hb-xxl
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Kaushal Shriyan @ 2010-02-23 8:41 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] customized init script
2010-02-23 8:41 [gentoo-user] customized init script Kaushal Shriyan
@ 2010-02-23 9:18 ` hb-xxl
2010-02-23 22:46 ` Stroller
2010-02-23 9:44 ` Amit Dor-Shifer
2010-02-23 11:33 ` Peter Humphrey
2 siblings, 1 reply; 5+ messages in thread
From: hb-xxl @ 2010-02-23 9:18 UTC (permalink / raw
To: gentoo-user
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).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] customized init script
2010-02-23 8:41 [gentoo-user] customized init script Kaushal Shriyan
2010-02-23 9:18 ` hb-xxl
@ 2010-02-23 9:44 ` Amit Dor-Shifer
2010-02-23 11:33 ` Peter Humphrey
2 siblings, 0 replies; 5+ messages in thread
From: Amit Dor-Shifer @ 2010-02-23 9:44 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] customized init script
2010-02-23 8:41 [gentoo-user] customized init script Kaushal Shriyan
2010-02-23 9:18 ` hb-xxl
2010-02-23 9:44 ` Amit Dor-Shifer
@ 2010-02-23 11:33 ` Peter Humphrey
2 siblings, 0 replies; 5+ messages in thread
From: Peter Humphrey @ 2010-02-23 11:33 UTC (permalink / raw
To: gentoo-user
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] customized init script
2010-02-23 9:18 ` hb-xxl
@ 2010-02-23 22:46 ` Stroller
0 siblings, 0 replies; 5+ messages in thread
From: Stroller @ 2010-02-23 22:46 UTC (permalink / raw
To: gentoo-user
On 23 Feb 2010, at 09:18, hb-xxl@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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-23 23:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23 8:41 [gentoo-user] customized init script Kaushal Shriyan
2010-02-23 9:18 ` hb-xxl
2010-02-23 22:46 ` Stroller
2010-02-23 9:44 ` Amit Dor-Shifer
2010-02-23 11:33 ` Peter Humphrey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox