Hello!
I would like write panel with start/stop/restart my server.
I start my server in console this command:
Quote:
screen -A -m -d -S hlds ./hlds_run1 -game cstrike -nomaster +exec server.cfg
|
And i write: ps x
Quote:
vz138:/# ps x
PID TTY STAT TIME COMMAND
1 ? Ss 0:00 init [2]
1692 ? Ss 0:00 SCREEN -A -m -d -S hlds ./hlds_run1 -game cstrike -no
1693 pts/1 Ss+ 0:00 /bin/sh ./hlds_run1 -game cstrike -nomaster +exec ser
1702 pts/1 S+ 18:26 ./hlds_i686 -game cstrike -nomaster +exec server.cfg
7727 ? Rs 0:00 vzctl: pts/2
7728 pts/2 Ss 0:00 -bash
7732 pts/2 R+ 0:00 ps x
|
It's OK. I wrote script SHELL: start.sh
Quote:
#!/bin/sh
screen -A -m -d -S hlds ./hlds_run3 -game cstrike -nomaster +exec server.cfg
|
And script: start.php
PHP Code:
<?PHP
exec("sh /var/www/cs1/start.sh");
?>
But server isn't start. Why?