|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
||||
|
||||
|
Starting/stopping gameservers
Hello all,
I've posted something about this in the PHP forum too, but I'll post here aswell, since I was advised to do so. I've started working on a webbased control panel for gameservers. Really simple, just starting, stopping and restarting them. All the user has to do is click the right button. All the script has to do, is pass either START, STOP or RESTART to a script called codstarter (since I am testing this on an unused call of duty server install). I am using PHP's built in system() command, which allows to execute system commands. The command I'm using now is like this: PHP Code:
According to PHP's documentation, anything returned by the system should be placed in $retVal. However, $retVal always is 0. Would anyone know how to get the script working?
__________________
Boss: "We found a bug in your code!" Programmer: "That's no bug, that's just an undocumented feature!" is a nice way to show appreciation if my suggestion was helpful.Scriptrequests are not appreciated anywhere. Show input. Do some research. Explain the problem. Post relevant code only. |
|
#2
|
|||
|
|||
|
i assume you are on *nix
your $script_dir = "/home/ftd2/cod"; Quote:
will not work as long YOU ARE NOT ROOT, because 'su' (in this case) is INTERACTIVE and expect a passwd btw: why that 'cd', why not simply $script_dir/codstarter ..... look¦google for 'SSH' or 'sudo'
__________________
working on Solaris[5-9], preferred languages french and C. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Starting/stopping gameservers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|