Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I had no idea how to name the thing I'm looking for but I will try to describe it.

I'm looking for a tool that would allow you to do common tasks using the same command line on most platforms. It will do this by calling the platform specific tool.

Examples:

service apache stop/start/restart - working even if you are running Ubuntu where apache is apache2

service network restart - reinitialize all network interfaces

service apache disable - disable it from starting

service firewall stop/start/restart - that would use the OS firewall (detecting it)

pm install abc - that would run yun, apt-get, port, or raise not-implemented on Windows :) pm remove abc pm search abc - to find a package by its name

ifconfig - to run ipconfig when on windows

Is there any tool that is aiming to bring this? If not, you would like to contribute in one?

share|improve this question

2 Answers 2

As far as I know there is no command line tool that does anything like that. It sounds like a good idea, and I admit I haven't done more than a cursory Google search after reading your question, but I know that in my many years as a sysadmin I have never sean or heard of anything like that.

On a somewhat related note, have you heard of / used Webmin before?

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely. See the standard modules page for a list of all the functions built into Webmin, or check out the screenshots.

It provides a standard interface to services, as you describe, and I have successfully written scripts which would send commands to Webmin, which would then call things like /etc/init.d/named reload or such. SO this might be a good start for you if you were looking to create something like this.

share|improve this answer
    
Thanks, Josh. I know Webmin but I'm looking for a command line tool. An from the start it has to support RedHat, Ubuntu, Windows and OS X. –  sorin Sep 25 '10 at 14:17
    
There is no such tool. You're of course free to write your own. –  fahadsadah Sep 25 '10 at 14:51
    
@Sorin You could probably write a command line tool without too much difficulty which essentially uses curl or wget to dispatch commands to Webmin, which will handle the OS-level abstraction you're looking for... –  Josh Sep 25 '10 at 15:10

I though of suggesting a configuration management system like puppet but I know very little about this first hand, so I have had a quick look and that led me to this post on stackoverflow

A suggestion made on the accepted answer is SmartFrog which works on Windows too.

The point is that you can write a configuration to require apache is install for example and SmartFrog knows how to make that happen on all kinds of different systems including Windows.

If you are not interested in Windows and just want something across Linux distributions Puppet will do that.

If these systems can do it, then the code is already there, if you are going to build something perhaps having a look in that area will help.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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