Sh strat.sh

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Închis
Avatar utilizator
SysT3m
Nivel 2

Nivel 2
Mesaje: 176
Membru din: 28 Mai 2014, 17:40
Regat: Jinno
Aprecieri: 7  
Mulţumiri: 1  
Medalii

Cum fac ca start.sh meu sa pornesca automat ch 1 si 2?

Adica cand dau cd /usr/home/game

sh start.sh sa nu mai pun eu 2 sa porneasca el.

Vreau asta pentru a porni sv automat odata la 12h..
Avatar utilizator
Spyke
Metin Master

Metin Master
Mesaje: 2613
Membru din: 29 Iul 2016, 09:08
Server: Aoem2
Aprecieri: 205  
Mulţumiri: 3918  
Discord: Copiază ID
Medalii

te duci in etc ai acolo crontab e un fisier nu folder
pui asta
# Curatare loguri.
#minute hour mday month wday who command 3
* * */12 * * root /usr/home/game/sh start.sh
Avatar utilizator
SysT3m
Nivel 2

Nivel 2
Mesaje: 176
Membru din: 28 Mai 2014, 17:40
Regat: Jinno
Aprecieri: 7  
Mulţumiri: 1  
Medalii

Klaus Iohannis scrie:te duci in etc ai acolo crontab e un fisier nu folder
pui asta
# Curatare loguri.
#minute hour mday month wday who command 3
* * */12 * * root /usr/home/game/sh start.sh
crontab nui asa de destept sa selecteze el ch 1 sau 2.

12 insemna 12minute :)
Avatar utilizator
SysT3m
Nivel 2

Nivel 2
Mesaje: 176
Membru din: 28 Mai 2014, 17:40
Regat: Jinno
Aprecieri: 7  
Mulţumiri: 1  
Medalii

Cineva dau tanks
Avatar utilizator
[Tupeu]
Membru de Elita

Membru de Elita
Mesaje: 4101
Membru din: 28 Oct 2015, 16:16
Aprecieri: 35  
Mulţumiri: 2304  
 Contact:
Medalii

SysT3m scrie:Cineva dau tanks
Lasa start.sh aici.
Avatar utilizator
[Bullseye]
Utilizator interzis !

Utilizator interzis !
Mesaje: 201
Membru din: 16 Oct 2017, 20:00
Server: KOP2
Regat: Jinno
Aprecieri: 2  
Mulţumiri: 62  
Medalii

cate core ai la fiecare ch, si care e locatia ta? usr/game sau usr/home/game? sa-mi faci o poza la usr/home/game/server, ca sa iti fac eu un start.sh direct, fara sa mai alegi.
DACĂ TE-AM AJUTAT DĂ-MI UN THX
Imagine
Afișează semnătura
Avatar utilizator
SysT3m
Nivel 2

Nivel 2
Mesaje: 176
Membru din: 28 Mai 2014, 17:40
Regat: Jinno
Aprecieri: 7  
Mulţumiri: 1  
Medalii

[Tupeu] scrie:
SysT3m scrie:Cineva dau tanks
Lasa start.sh aici.

Cod: Selectaţi tot

#!/bin/sh
echo -e "\033[32m  
1 - (1) CH1 \n
2 - (2) CH2 \n
3 - (3) CH3 \n
4 - (4) CH4 \n 
5 - (5) Anuleaza Actiunea! \033[0m"
echo -e "\033[36m Copyright @ 2015! \033[0m"
read chs

case $chs in 
1*) 
    echo -e "\033[31m (Server): Fix - Offline Shop\033[0m"
    cd /usr/home/game/server/db_auth/db
    sleep 5
    clear
    cd /usr/home/game/server/db_auth/db
    sleep 5
    clear
    echo -e "\033[31m (Server): Deschid - DATABASES \033[0m"
    cd /usr/home/game/server/db_auth/db
    ./db &
    sleep 5
    clear
	echo -e "\033[31m \n PORNESC LOGINU ..\033[0m"
	cd /usr/home/game/server/db_auth/auth/
	./auth &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL1_2CORE ..\033[0m"
	cd /usr/home/game/server/ch1/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch1/core_2/
	./core_2 &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL99_1CORE ..\033[0m"	
	cd /usr/home/game/server/game/game99/
	./game99 &
	sleep 2
	clear
echo -e "\033[36m Copyright @ 2015! \033[0m"
;;
2*)

	echo -e "\033[31m PORNESC BAZA DE DATE ..\033[0m"
	cd /usr/home/game/server/db_auth/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC LOGINU ..\033[0m"
	cd /usr/home/game/server/db_auth/auth/
	./auth &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL1_2CORE ..\033[0m"
	cd /usr/home/game/server/ch1/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch1/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL2_2CORE...\033[0m"
	cd /usr/home/game/server/ch2/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch2/core_2/
	./core_2 &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL99_1CORE ..\033[0m"	
	cd /usr/home/game/server/game/game99/
	./game99 &
	sleep 2
	clear
	cd /usr/home/game/server/game/game99 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch1/core_1 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch1/core_2 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch2/core_1 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch2/core_2 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch3/core_1 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch3/core_2 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch4/core_1 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch4/core_2 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/db_auth/auth && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/db_auth/db && sh clear.sh
	sleep 2
	clear
echo -e "\033[36m Copyright @ 2015! \033[0m"
;;
3*)

	echo -e "\033[31m PORNESC BAZA DE DATE ..\033[0m"
	cd /usr/home/game/server/db_auth/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC LOGINU ..\033[0m"
	cd /usr/home/game/server/db_auth/auth/
	./auth &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL1_2CORE ..\033[0m"
	cd /usr/home/game/server/ch1/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch1/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL2_2CORE...\033[0m"
	cd /usr/home/game/server/ch2/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch2/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL3_2CORE...\033[0m"
	cd /usr/home/game/server/ch3/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch3/core_2/
	./core_2 &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL99_1CORE ..\033[0m"	
	cd /usr/home/game/server/game/game99/
	./game99 &
	sleep 2
	clear
echo -e "\033[36m Copyright @ 2015! \033[0m"
;;
4*)

	echo -e "\033[31m PORNESC BAZA DE DATE ..\033[0m"
	cd /usr/home/game/server/db_auth/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC LOGINU ..\033[0m"
	cd /usr/home/game/server/db_auth/auth/
	./auth &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL1_2CORE ..\033[0m"
	cd /usr/home/game/server/ch1/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch1/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL2_2CORE...\033[0m"
	cd /usr/home/game/server/ch2/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch2/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL3_2CORE...\033[0m"
	cd /usr/home/game/server/ch3/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch3/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL4_2CORE...\033[0m"
	cd /usr/home/game/server/ch4/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch4/core_2/
	./core_2 &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL99_1CORE ..\033[0m" 
	cd /usr/home/game/server/game/game99/
	./game99 &
	sleep 2
	clear
;;
5*)
clear
	echo -e "\033[32m \n Actiune Anulata!\033[0m"
;;
esac
Ultima oară modificat 12 Dec 2017, 20:57 de către [Tupeu], modificat 1 dată în total.
Motiv: spoiler
Avatar utilizator
[Tupeu]
Membru de Elita

Membru de Elita
Mesaje: 4101
Membru din: 28 Oct 2015, 16:16
Aprecieri: 35  
Mulţumiri: 2304  
 Contact:
Medalii

SysT3m scrie:
[Tupeu] scrie:
SysT3m scrie:Cineva dau tanks
Lasa start.sh aici.

Cod: Selectaţi tot

#!/bin/sh
echo -e "\033[32m  
1 - (1) CH1 \n
2 - (2) CH2 \n
3 - (3) CH3 \n
4 - (4) CH4 \n 
5 - (5) Anuleaza Actiunea! \033[0m"
echo -e "\033[36m Copyright @ 2015! \033[0m"
read chs

case $chs in 
1*) 
    echo -e "\033[31m (Server): Fix - Offline Shop\033[0m"
    cd /usr/home/game/server/db_auth/db
    sleep 5
    clear
    cd /usr/home/game/server/db_auth/db
    sleep 5
    clear
    echo -e "\033[31m (Server): Deschid - DATABASES \033[0m"
    cd /usr/home/game/server/db_auth/db
    ./db &
    sleep 5
    clear
	echo -e "\033[31m \n PORNESC LOGINU ..\033[0m"
	cd /usr/home/game/server/db_auth/auth/
	./auth &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL1_2CORE ..\033[0m"
	cd /usr/home/game/server/ch1/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch1/core_2/
	./core_2 &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL99_1CORE ..\033[0m"	
	cd /usr/home/game/server/game/game99/
	./game99 &
	sleep 2
	clear
echo -e "\033[36m Copyright @ 2015! \033[0m"
;;
2*)

	echo -e "\033[31m PORNESC BAZA DE DATE ..\033[0m"
	cd /usr/home/game/server/db_auth/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC LOGINU ..\033[0m"
	cd /usr/home/game/server/db_auth/auth/
	./auth &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL1_2CORE ..\033[0m"
	cd /usr/home/game/server/ch1/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch1/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL2_2CORE...\033[0m"
	cd /usr/home/game/server/ch2/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch2/core_2/
	./core_2 &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL99_1CORE ..\033[0m"	
	cd /usr/home/game/server/game/game99/
	./game99 &
	sleep 2
	clear
	cd /usr/home/game/server/game/game99 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch1/core_1 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch1/core_2 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch2/core_1 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch2/core_2 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch3/core_1 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch3/core_2 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch4/core_1 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/ch4/core_2 && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/db_auth/auth && sh clear.sh
	sleep 2
	clear
	cd /usr/home/game/server/db_auth/db && sh clear.sh
	sleep 2
	clear
echo -e "\033[36m Copyright @ 2015! \033[0m"
;;
3*)

	echo -e "\033[31m PORNESC BAZA DE DATE ..\033[0m"
	cd /usr/home/game/server/db_auth/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC LOGINU ..\033[0m"
	cd /usr/home/game/server/db_auth/auth/
	./auth &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL1_2CORE ..\033[0m"
	cd /usr/home/game/server/ch1/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch1/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL2_2CORE...\033[0m"
	cd /usr/home/game/server/ch2/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch2/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL3_2CORE...\033[0m"
	cd /usr/home/game/server/ch3/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch3/core_2/
	./core_2 &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL99_1CORE ..\033[0m"	
	cd /usr/home/game/server/game/game99/
	./game99 &
	sleep 2
	clear
echo -e "\033[36m Copyright @ 2015! \033[0m"
;;
4*)

	echo -e "\033[31m PORNESC BAZA DE DATE ..\033[0m"
	cd /usr/home/game/server/db_auth/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC LOGINU ..\033[0m"
	cd /usr/home/game/server/db_auth/auth/
	./auth &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL1_2CORE ..\033[0m"
	cd /usr/home/game/server/ch1/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch1/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL2_2CORE...\033[0m"
	cd /usr/home/game/server/ch2/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch2/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL3_2CORE...\033[0m"
	cd /usr/home/game/server/ch3/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch3/core_2/
	./core_2 &
	sleep 2
	echo -e "\033[31m \n PORNESC CHANNEL4_2CORE...\033[0m"
	cd /usr/home/game/server/ch4/core_1/
	./core_1 &
	sleep 2
	cd /usr/home/game/server/ch4/core_2/
	./core_2 &
	sleep 2
	clear
	echo -e "\033[31m \n PORNESC CHANNEL99_1CORE ..\033[0m" 
	cd /usr/home/game/server/game/game99/
	./game99 &
	sleep 2
	clear
;;
5*)
clear
	echo -e "\033[32m \n Actiune Anulata!\033[0m"
;;
esac
Incearca:

Cod: Selectaţi tot

#!/bin/sh
cd /usr/home/game/server/db_auth/db
./db &
sleep 5
cd /usr/home/game/server/db_auth/auth/
./auth &
sleep 2
cd /usr/home/game/server/ch1/core_1/
./core_1 &
cd /usr/home/game/server/ch1/core_2/
./core_2 &
sleep 2
cd /usr/home/game/server/ch2/core_1/
./core_1 &
sleep 2
cd /usr/home/game/server/ch2/core_2/
./core_2 &
sleep 2
cd /usr/home/game/server/game/game99/
./game99 &
sleep 2
Faci fisier nou .sh
Pentru acest mesaj, [Tupeu] for the post:
SysT3m
Avatar utilizator
Negrea Nicusor Valentin
Utilizator interzis !

Utilizator interzis !
Mesaje: 341
Membru din: 25 Aug 2017, 20:48
Aprecieri: 33  
Mulţumiri: 32  
Medalii

T/C
Închis

Înapoi la “Probleme rezolvate”

  • Informaţie