Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache2 startup script error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
fennec
l33t
l33t


Joined: 30 Aug 2003
Posts: 613
Location: Montreal

PostPosted: Fri Feb 27, 2004 1:17 am    Post subject: apache2 startup script error Reply with quote

Getting the following error message when starting apache2

Code:
# runscript.sh apache2 start
/sbin/runscript.sh: line 1:ELF: command not found
 * Starting apache2...                                                    [ ok ]


This is my apache2 script file

/etc/init.d/apache2
Code:
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/net-www/apache/files/2.0.40/apache2.initd,v 1.13 2003/10/31 07:17:45 rajiv Exp $

opts="${opts} reload"

depend() {
   need net
   use mysql dns logger netmount
   after sshd
}

start() {
   ebegin "Starting apache2"
   [ -f /var/log/apache2/ssl_scache ] && rm /var/log/apache2/ssl_scache
   env -i PATH=$PATH /sbin/start-stop-daemon --quiet \
      --start --startas /usr/sbin/apache2 \
      --pidfile /var/run/apache2.pid -- -k start ${APACHE2_OPTS}
   eend $?
}

stop() {
   ebegin "Stopping apache2"
   /usr/sbin/apache2ctl stop >/dev/null
   start-stop-daemon -o --quiet --stop --pidfile /var/run/apache2.pid
   eend $?
}

reload() {
   ebegin "Gracefully restarting apache2"
   /usr/sbin/apache2 -t ${APACHE2_OPTS} &>/dev/null
   if [ "$?" = "0" ]
   then
      if [ -f /var/run/apache2.pid ]
      then
         kill -USR1 $(</var/run/apache2.pid)
         eend $?
      else
         svc_start
         eend $?
      fi
   else
      if [ -f /var/run/apache2.pid ]
      then
         svc_stop
      fi
      #show the error(s)
      /usr/sbin/apache2 -t ${APACHE2_OPTS}
      eend 1
   fi
}
Back to top
View user's profile Send private message
juliancoccia
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jan 2004
Posts: 91
Location: Opensource World

PostPosted: Fri Feb 27, 2004 2:47 am    Post subject: Reply with quote

I would this on my first line:
Code:
#!/bin/bash


instead of what you have now...
_________________
http://julian.coccia.com
http://www.linuxespanol.com
Back to top
View user's profile Send private message
fennec
l33t
l33t


Joined: 30 Aug 2003
Posts: 613
Location: Montreal

PostPosted: Sat Mar 06, 2004 12:35 pm    Post subject: Reply with quote

I dont know why but i just ranned a world update and it fixed it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum