123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|697|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Web Development -> running a linux script via php

Mon, 27 Sep 2010, 11:13
waroffice
Afternoon,

I have been struggling with this all day.

I have a teamspeak server on my server and it sometimes stops working, i want to make a simple webpage that my brother can go to and restart the service.

The teamspeak server needs to be started by a specific user.

i created a script with an "su -c '/path/to/script' teamspeak </password/file" entry

this would run sometimes but it just wouldn't work

Is there a better way?

Thanks
Mon, 27 Sep 2010, 11:49
waroffice
never mind, i figured it out



Mon, 27 Sep 2010, 13:00
Jayenkai
Shove the answer here, other folk might need it in the future!

(Jay pet hates #5356, finding a forum topic, from google, that ends with "never mind, figured it out")

-=-=-
''Load, Next List!''
Mon, 27 Sep 2010, 23:42
Stealth
The command is shell_exec().

-=-=-
Quit posting and try Google.
Tue, 28 Sep 2010, 03:01
waroffice
its a bit of a nightmare but i will do it, when i start work in 2 hours, not wasting my OWN time