Jump to content
  • 0

pomoc ./start.sh


liskji00

Dotaz

Skusam delat administraci a potrebuji zapinani

proste mam udelani prikaz v start.sh normalne to jde cez puttynu

 

no a ted potrebuji aby cez zapinani.php aby jse to dalo zapnut cez web potrebuji "help"

vopred dik dik dik

Link to comment
Share on other sites

7 odpovědí na tuto otázku

Recommended Posts

  • 0

samp omg ale to je jedno asi ne? protoze ja potrebuji jenom prikaz spoustit cez web ten ./start.sh

 

jednouse trebarz

 

<?php exec('/root/samp03/start.sh'); ?>

 

nevim jak omg :(

 

a chcem to jenom pros .sh !

Link to comment
Share on other sites

  • 0

mam 777

exec("/root/samp03/start.sh &");

 

obsah start.sh

 

#!/bin/bash

export GTA_PATH=/root/samp03

cd $GTA_PATH

while [ true ]; do

cat {$GTA_PATH}/server_log.txt >> {$GTA_PATH}/full_server_log.txt

rm {$GTA_PATH}/server_log.txt

touch {$GTA_PATH}/server_log.txt

./samp03svr

done

Link to comment
Share on other sites

  • 0

Proč to děláš složite přes start.sh ?

 

Použíj, jak tu navrhují PHP

<?php
exec("/root/samp03/samp03c &");
?>

 

Pokud chceš pres start.sh

 

Do start.sh

cd /root/samp03
nano start.sh
#!/bin/bash
./samp03c &
./announce

 

Pak ho nezapomen nastavit chmod na 777

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...