Jump to content
  • 0

./athena-start start problem


Question

Posted

Hi I can't seem to run my athena it says file not found or directory not found..

 

current code is

 

#!/bin/sh
# athena starting script by rowla
# modified by [email protected] (NL101541)
 
PATH=./:$PATH
 
L_SRV=$trunk1/login-server
C_SRV1=$trunk1/char-server
M_SRV1=$trunk1/map-server
C_SRV2=$trunk/char-server
M_SRV2=$trunk/map-server
 
print_start() {
#    more << EOF
echo "Athena Starting..."
echo "            (c) 2003 Athena Project"
echo "              modified by [email protected]"
echo ""
#echo "Debug informations will appear,"
#echo "since this is a test release."
#echo ""
echo "checking..."
#EOF
}
 
check_files() {
 
    for i in ${L_SRV} ${C_SRV1} ${M_SRV1} ${C_SRV2} ${M_SRV2}
    do
        if [ ! -f ./$i ]; then
            echo "$i does not exist, or can't run."
            echo "Stop. Check your compile."
            exit 1;
        fi
    done
 
#    more << EOF
echo "Check complete."
echo "Looks good, a nice Athena!"
#EOF
}
 
 
case $1 in
    'start')
        print_start
        check_files
 
        exec .{L_SRV}&
echo $! > .${L_SRV}.pid
        exec .{C_SRV1}&
echo $! > .${C_SRV1}.pid
        exec .{M_SRV1}&
echo $! > .${M_SRV1}.pid
exec .{C_SRV2}&
echo $! > .${C_SRV2}.pid
        exec .{M_SRV2}&
echo $! > .${M_SRV2}.pid
 
        echo "Now Started Athena."
;;
    'stop')
for i in .${L_SRV}.pid .${C_SRV1}.pid .${M_SRV1}.pid .${C_SRV2}.pid .${M_SRV2}.pid
   do
if [ -e ./$i ]; then
   kill $(cat $i)
   rm $i
fi
   done
;;
    'restart')
        $0 stop
        $0 start
;;
    *)
        echo "Usage: athena-start { start | stop | restart }"
;;
esac
 

 

what seems to be the problem here? Thanks in advance!

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...