-
Notifications
You must be signed in to change notification settings - Fork 0
dacacioa/opmenu
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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
About
Opmenu is a script for basic Linux system administration.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published