Coder Social home page Coder Social logo

opmenu's Introduction

OpMenu is a python based script for basic Linux system administration.

It follows the Gomenu script guidelines (https://fossies.org/linux/privat/old/OpMenu3.0.tar.gz/index_af.html). 
OpMenu uses .mnu files to build a screen menu that allow to low levels sysadmins and system operators do basic 
and preconfigured actions (f.e. restart a webserver, check the status of a daemon, etc...)

You can find some basic .mnu examples files in the repository. 
All menu options have to begin with $MENU key and all the actions have to contain .sh or sudo command. 
A lot of Gomenu .mnu must be compatibles.

=====================

Requirements:

* Python 2.X
* main.mnu file
* python-distutils-extra for Internationalize Language

=====================

TODO

* Error control
* Improve Look&Feel

=====================

LANGUAGE SETUP

Execute script setup_lang.sh to compile languages in your system.

------------------------------
#!/bin/bash

msgfmt po/es_ES.po --output-file /usr/share/locale/es/LC_MESSAGES/opmenu.mo # spanish translation
msgfmt po/gl_ES.po --output-file /usr/share/locale/gl/LC_MESSAGES/opmenu.mo # galician translation
msgfmt po/ca_ES.po --output-file /usr/share/locale/ca/LC_MESSAGES/opmenu.mo # catalan translation

exit
------------------------------

If you want to add a new translation or add/modify texts,  you will have to regenerate the opmenu.pot with the command:

# xgettext --language=Python --keyword=_ --output=po/opmenu.pot --from-code=UTF-8 `find . -name "*.py"`

(Also you can easily add languages with Poedit utility: http://www.poedit.net/)

Save the generated files in the "po" directory and run the following command for the new language.

# msgfmt po/ca_ES.po --output-file /usr/share/locale/ca/LC_MESSAGES/opmenu.mo

You can test language seting LANG environment.

Ex.

# export LANG=gl_ES.UTF-8

??NOTE: To add new texts that you want translate, add it to script with _ ("sample text") syntax.??

=====================

INSTALL NOTES.

Add oper group to sudoers for nonpassword required if user operator is not root.

%oper ALL=(ALL:ALL) NOPASSWD:ALL

For automatic start of the program you have to add the next lines in the .bash_profile of the user:

exec  ./opmenu.py

=====================

Comments and request are welcome.

Regards!

D. Acacio

opmenu's People

Contributors

dacacioa avatar narebril avatar

Stargazers

RPS avatar

Watchers

Javier Arellano avatar James Cloos avatar  avatar

opmenu's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.