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..
Sh strat.sh
crontab nui asa de destept sa selecteze el ch 1 sau 2.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
12 insemna 12minute
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.
[Tupeu] scrie:Lasa start.sh aici.SysT3m scrie:Cineva dau tanks
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
Motiv: spoiler
Incearca:SysT3m scrie:[Tupeu] scrie:Lasa start.sh aici.SysT3m scrie:Cineva dau tanksCod: 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
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
T/C
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 18 vizitatori



daca te-am ajutat

