I have written few shell scripts which can do specific tasks .

But my mangaer wants that there should be some web interface where , he can run those scripts and function using web .

Now i don't know how can i link bash with web .

I know PHP.

Also one thing more if i use python can i make web interface , or will it easir than programming in bash

link|improve this question

feedback

3 Answers

up vote 3 down vote accepted

If your manager insists there are some solutions like webmin or zentyal to manage GNU/linux servers from a web interface.

You can easily add your own scripts to those web interfaces. The advantage of using tested products over your own reinvent-the-wheel web service is that those web services are developed with security in mind.

However as a sysadmin I encourage you to admin your servers using just a shell (bash with screen for example) through ssh.

link|improve this answer
cpanel is also doing the same thing . Can i make small GUI in Bash that can do the stuff . can i see the same gui in putty client – Mirror51 Apr 30 '11 at 15:10
1  
No, you cant have a single GUI that can be displayed in a terminal and in a web browser. – sciurus May 1 '11 at 4:38
feedback

I would highly NOT recommend to write a software in PHP, that has access to /bin or other relevant system parts and serve it via apache. Because: PHP is not strict, reliable and secure enough to realize programs as Webmin with.

But I wonder at all, why a manager would want to do administrative tasks on a server? Are those really administrative tasks? Or is it something, you could write in PHP from scratch? I mean, If he just wants to shrink an image, you don't need a bash script for that.

I wrote a remote installer in python once, that was only accessible in the companies intranet and executed a few scripts via an SSH connection, using certificates. It worked, but was really not a good solution. But I would recommend a way like this one, to have a relatively secure way to hack this together.

link|improve this answer
feedback

Webmin allows you to use commands via a remote interface.

http://www.webmin.com/

link|improve this answer
but i want to create my own small interface like click here to backup , click here to restore etc – Mirror51 Apr 30 '11 at 12:50
But why? Something is already made to do just what you want. – Cody Harlow Apr 30 '11 at 12:55
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.