dacacioa / opmenu Goto Github PK
View Code? Open in Web Editor NEWOpmenu is a script for basic Linux system administration.
Opmenu is a script for basic Linux system administration.
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
Log file in /var/log with unprivileged user can not be created ([Errno 13] Permission denied).
Do the translation of the code and comments to English
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.