Running a shell script from PHP
Posted on 2004-08-10
I would like to be able to restart my linux teamspeak server if it goes down by clicking a link on my webpage.
What would i need to code to make this happen. Or is it possible? I have read on here about others attempting to excute shell scripts simialrly but failing due to permissions.
What I got so far is this
$sys = `exec /pathtomytss2_rc2directory/teamspeak2-server_startscript start`;
what i would like to have is something that would allow me to send "start, stop, restart" as variable to the script.