probelma sh start.sh

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Avatar utilizator
shadowcs1
Nivel 2

Nivel 2
Mesaje: 200
Membru din: 12 Ian 2014, 18:50
Server: Metin2 Holy
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 3  
Medalii

Eu am start.sh

Cod: Selectaţi tot

#/bin/sh
ORIGCHANNELS=$(cat ./daroo/channels.txt)
if [ "$1" != '' ] && [ "$1" = "quickstart" ] && [ "$2" != '' ];then
	if [ "$2" -le $ORIGCHANNELS ];then
		CHANNELS="$2"
	else
		exit
	fi
else
	echo -e "\033[31m Ce CH vrei sa pornesti ma BOLOND?\033[0m"
	read CHANNELS
fi
if [ "$CHANNELS" -gt $ORIGCHANNELS ];then
	echo -e "\033[31m Prea multe canale(maximal $ORIGCHANNELS !)\033[0m"
	exit
fi
echo -e "\033[31m Pornesc DB-Server...\033[0m"
cd /usr/home/game/db
./db &
cd ..
echo -e "\033[31m Pornesc Auth-Server...\033[0m"
cd /usr/home/game/auth
./auth &
cd ..
while [ $CHANNELS -ge 1 ]
do
  echo -e "\033[31m Pornesc Channel "$CHANNELS" ...\033[0m"
  sleep 1
  cd /usr/home/game/channel$CHANNELS
  ./game &
  sleep 1
  cd ..
  CHANNELS=$(( $CHANNELS-1 ))
  sleep 1
done
echo -e "\033[31m Pornesc Channel 99...\033[0m"
cd /usr/home/game/game99
./game &
cd ..
sleep 4
echo -e "\033[31m Serverul a fost pornit cu succes BOLOND!\033[0m"
cand sa deschid sererul imi da: cd /usr/home/game # sh start.sh
Ce CH vrei sa pornesti ma BOLOND?
1
Pornesc DB-Server...
Pornesc Auth-Server...
Pornesc Channel 1 ...
start.sh: ./db: not found
start.sh: ./auth: not found
start.sh: ./game: not found
Pornesc Channel 99...
start.sh: ./game: not found
Serverul a fost pornit cu succes BOLOND!
Avatar utilizator
Mr. Tiger
Membru Club

Membru Club
Mesaje: 1223
Membru din: 06 Sep 2013, 11:19
Aprecieri: 12  
Mulţumiri: 126  
Medalii

Refa symlinkurile sau vezi ca game sa fie in usr/home .

Cod: Selectaţi tot

“The worst day of loving someone is the day that you lose them.”

― L.J Smith
Afișează semnătura
Avatar utilizator
shadowcs1
Nivel 2

Nivel 2
Mesaje: 200
Membru din: 12 Ian 2014, 18:50
Server: Metin2 Holy
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 3  
Medalii

symlink-urile le ai mai sus.
game-ul db auth etc sunt in /usr/home/game.
Avatar utilizator
Mr. Tiger
Membru Club

Membru Club
Mesaje: 1223
Membru din: 06 Sep 2013, 11:19
Aprecieri: 12  
Mulţumiri: 126  
Medalii

Incearca sa dai un reboot poate merge dupa.

Cod: Selectaţi tot

“The worst day of loving someone is the day that you lose them.”

― L.J Smith
Afișează semnătura
Avatar utilizator
shadowcs1
Nivel 2

Nivel 2
Mesaje: 200
Membru din: 12 Ian 2014, 18:50
Server: Metin2 Holy
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 3  
Medalii

nu merge
Avatar utilizator
SauRRoN
Fost Helper

Fost Helper
Mesaje: 2834
Membru din: 26 Iul 2014, 11:25
Regat: Jinno
Aprecieri: 581  
Mulţumiri: 1000  
Discord: Copiază ID
Medalii

Refa start.sh sau da-mi start.sh si til fac eu sau sa vad ce are de merge...
Imagine
Afișează semnătura
Avatar utilizator
shadowcs1
Nivel 2

Nivel 2
Mesaje: 200
Membru din: 12 Ian 2014, 18:50
Server: Metin2 Holy
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 3  
Medalii

il ai mai sus. Spoler> Code.
Avatar utilizator
SauRRoN
Fost Helper

Fost Helper
Mesaje: 2834
Membru din: 26 Iul 2014, 11:25
Regat: Jinno
Aprecieri: 581  
Mulţumiri: 1000  
Discord: Copiază ID
Medalii

Da-mi destinatia la fiecare ch si auth si game99..
Imagine
Afișează semnătura
Avatar utilizator
shadowcs1
Nivel 2

Nivel 2
Mesaje: 200
Membru din: 12 Ian 2014, 18:50
Server: Metin2 Holy
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 3  
Medalii

Imagine
Avatar utilizator
SauRRoN
Fost Helper

Fost Helper
Mesaje: 2834
Membru din: 26 Iul 2014, 11:25
Regat: Jinno
Aprecieri: 581  
Mulţumiri: 1000  
Discord: Copiază ID
Medalii

Incearca..
Sfat:

Cod: Selectaţi tot

#!/bin/sh


echo -e "\033[31m  
Ce ch-uri vrei sa  pornesti? \n 
1 - (1) CH 1\n 
1 - (1) CH 2\n
3 - (3) Toate Ch-urile\033[0m"

read chs

case $chs in 
1*)
    echo -e "\033[31m Se porneste Baza de date..\033[0m"
    cd ./usr/home/game/db
    ./db &
    sleep 2
    clear
    echo -e "\033[31m \n Se porneste Auth ..\033[0m"
    cd ../usr/home/game/auth
    ./auth &
    sleep 2
    clear
    echo -e "\033[31m \n Se porneste CH 1 ..\033[0m"
    cd ../usr/home/game/channel1/
    ./game & 
    sleep 2
    clear
    echo -e "\033[31m \n Se porneste Ch2 ..\033[0m"
    cd ../usr/home/game/channel2/
    ./game &  
    sleep 2
    clear
    echo -e "\033[31m \n Se porneste CH 99 ..\033[0m"
    cd ../usr/home/game/game99
    ./game &  
    sleep 2
    clear
    echo -e "\033[32m \n CH1 este pornit!\033[0m"
;;
2*)
    echo -e "\033[31m Se porneste Baza de date ..\033[0m"
    cd ./usr/home/game/db
    ./db &
    sleep 2
    clear
    echo -e "\033[31m \n Se porneste Auth ..\033[0m"
    cd ../usr/home/game/auth 
    ./auth &
    sleep 2
    clear
    echo -e "\033[31m \n Se porneste CH 1 ..\033[0m"
    cd ../../usr/home/game/channel1/
    ./game &  
    sleep 2
    clear
    cd ../usr/home/game/game99
    ./game &  
    sleep 2
    clear
    cd ../usr/home/game/channel1/
    ./game &  
    sleep 2
    clear
    echo -e "\033[32m \n Server a fost pornit cu succes by SauRRoN!\033[0m"
;;
esac
Imagine
Afișează semnătura
Închis
Răspunsuri
4
Vizualizări
221
Răspunsuri
1
Vizualizări
251
Răspunsuri
3
Vizualizări
261
Răspunsuri
3
Vizualizări
149

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 106 vizitatori