PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Startskript funktioniert nicht ganz mit Areca HTTP Proxy



DaSilva
04.09.08, 19:19
Ich hab einen RAID-Controller von Areca in meinem Debian Etch Server.
Wenn ich das dazu passende Webinterface manuell via "/usr/local/sbin/archttp64" starte klappt dies auch.
Sobald ich dies allerdings als init-Script mache nicht mehr, denn der Webservice ist nur noch unter Port "1" statt "82" erreichbar.
Ich kann allerdings keine Konfigurationsdatei dafür finden bzw. die eigentlich dafür angelegte wird nicht gelesen.
Das Problem tritt sowohl bei diesem init-Script auf:


#! /bin/sh

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/archttp64
DAEMON_OPTS=/usr/local/sbin/archttpsrv.conf
NAME=archttp64
DESC="Areca RAID controller management interface"

test -x $DAEMON || exit 0

. /lib/lsb/init-functions

set -e

case "$1" in
start)
log_begin_msg "Starting $DESC..."
start-stop-daemon --start --quiet -b -m --pidfile /var/run/$NAME.pid \
--exec $DAEMON -- $DAEMON_OPTS 2>/dev/null || log_end_msg 1
log_end_msg 0
;;
stop)
log_begin_msg "Stopping $DESC..."
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
-s INT --exec $DAEMON --oknodo || log_end_msg 1
sleep 5
log_end_msg 0
;;
restart|force-reload)
log_begin_msg "Restarting $DESC..."
start-stop-daemon --stop --quiet --exec $DAEMON --pidfile \
/var/run/$NAME.pid --oknodo
sleep 6
start-stop-daemon --start -m -b --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS || log_end_msg 1
log_end_msg 0
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0

als auch mit diesem (testweise):


#! /bin/sh

# The user that will run the server
USER=root

# Leave this alone.
NAME=archttp64

PATH=/bin:/usr/bin:/sbin:/usr/sbin

# DON'T FORGET TO CHANGE THE PATH TO YOUR NEEDS!
DIR=/usr/local/sbin/

# Leave this alone.
DAEMON=archttp64

# Internet-server:
PARAMS="/usr/local/sbin/archttpsrv.conf"

# Leave this alone.
DESC="Areca RAID controller management interface"

case "$1" in
start)
if [[ `su $USER -c "screen -ls | grep $NAME"` ]]
then
echo "archttp64 is already running!"
else
echo "Starting $DESC: $NAME"
su $USER -c "cd $DIR; screen -m -d -S $NAME ./$DAEMON $PARAMS"
fi
;;

stop)
if [[ `su $USER -c "screen -ls | grep $NAME"` ]]
then
echo -n "Stopping $DESC: $NAME"
kill `ps aux | grep -v grep | grep -i $USER | grep -i screen | grep -i $NAME | awk '{print $2}'`
echo " ... done."
else
echo "Coulnd't find a running $DESC"
fi
;;

restart)
if [[ `su $USER -c "screen -ls | grep $NAME"` ]]
then
echo -n "Stopping $DESC: $NAME"
kill `ps aux | grep -v grep | grep -i $USER | grep -i screen | grep -i $NAME | awk '{print $2}'`
echo " ... done."
else
echo "Couldn't find a running $DESC"
fi

echo -n "Starting $DESC: $NAME"
su $USER -c "cd $DIR; screen -m -d -S $NAME ./$DAEMON $PARAMS"
echo " ... done."
;;

status)
ps aux | grep -v grep | grep hlds_r > /dev/null
CHECK=$?
[ $CHECK -eq 0 ] && echo "archttp64 is UP" || echo "archttp64 is DOWN"
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac

exit 0

Immer wird richtig auf die IP des Server gesetzt, nicht aber auf den gewünschten Port.
Bitte um Hilfe. Danke.