You will have permissions issues with the user www-data. Attempting to run system services from a web application is an attempt to subvert the security limitations of this user, which are there for good reason.
The other issue is that this approach does not have a way of killing services, so you will just keep attempting to spawn multiple instances with multiple clicks. A way to do this in a more sane way (and to avoid the permissions issues) would be to store the value of a variable, say 'runowserver' in a database, then have a system daemon script handle it. If the variable is 0, you could then have it run an owserver stop or pkill. I run the start function at boot, which you can see at the top here: https://github.com/iinnovations/iicontrollibs/blob/master/cupid/boot.py It doesn't actually pull a db variable, but you can see easily in the script how to do that (e.g. see where the web server type is read from the db). C > On Dec 27, 2015, at 7:35 AM, Mike Kalist <mike.kal...@gmail.com> wrote: > > Hi All I know this is probably not the right place for this but after > hours of google thought i wold throw this out there. > > I want to make a local website to send commands to pi all on local server > > push button on click send a server side command /opt/owfs/bin/owserver > -a alias.txt -u -p 3000 > > > I have a scripts bash and perl and tried to run them on click with no > success > > Any help would be greatly appreciated. > > > Mike > > > ------------------------------------------------------------------------------ > _______________________________________________ > Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/owfs-developers ------------------------------------------------------------------------------ _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers