




We play with our son in the Titan quest, or rather I play, and he looks) There are some artifacts that fall out of the monsters, in the Russian version they are called entities. Then one day I had some kind of Achilles essence of something there. In the picture something else, but from the same opera)
In the panel of the script there is a description ( description ), a piece of code ( preview ), the author and the date. For SH and PY scripts it is possible to add options (the options field). The script is selected (and any other object) by clicking on any part of the panel (except for the “quick” buttons). Click on the script (second, third, etc.), click on the server (second, third, etc.) and click on Run script . The selected script or scripts will be executed on the selected server or servers. If you need to “quickly” execute one script, you can use the “quick” button on the script panel, click on the server (second, third, etc.) and click on the Run of the desired script. While writing the article there were changes. Separated SQL scripts from the rest, added a separate command and permishon for the execution of escules. This made it possible to give, for example, only the rights to execute escules, since SH and PY are much more powerful, they provide almost unlimited possibilities. But I didn’t redo the screenshots) Scripts could be limited to, almost everything can be done by them, but it was already difficult to stop).
In fact, these can be any files, as in this example a regular txt file is used as a test update. You upload a file to the server (most often it is zip) and somehow use it with the help of scripts. Updates also have a description, author, date and size shown.
Dumps have no description, only the name, size and creation time. Probably not only all at least once (two, three) banged the food base? I brought this opportunity to a new level) Send dump This command expands the server base from the selected dump. Do you feel the possibilities? (You hear the crash of the farts) Yes, in 
Each task has a unique identifier ( crontab id ), it is necessary for subsequent manipulations with it. The description indicates what the task will do. In the example, run the test2.sh script on the server with the address jboss @ localhost. The start time of the task is indicated in the Start date field in the format YYYY-MM-DD HH: MM The author and the creation time are indicated. You can cancel the task, change the time, make the task permanent (will be executed every day at a specified time) or vice versa one-time.
The servers display the address ( ssh address ), you can write in the user @ address format, but it is better to use ssh aliases (~ / .ssh / config) and specify some meaningful names. HTTP adress is an application URL deployed on the server. The working directory ( working folder ) and port ( server bind port ) is the folder where the application is located and the port it opens accordingly. Description, author, date. In the screenshot, a couple of new teams were added, which were added at the time of writing: Prop and Full . We have two main configuration files, these commands allow you to edit them conveniently.
The rest of the team. First reds:
class CommandClass: """ """ def __init__( self, permission='run_command', # Permission needed to run this command. position=1, # Position in commands list section='', # Section command will be placed to. style='', # Class assigned to a command button title='', # Pop up help message(via title) short='', # Short name for commands in quick section menu='', # Command name in UI name='', # Command name(an internal command name) run='', # Prevent CRONing his=True, # Command log will be saved to history fst=False, # Add command to quick section dgr='false', # If true will show confirmation window job='false', # Check if some cron jobs selected srv='false', # Check if some servers selected upd='false', # Check if some updates selected scr='false', # Check if some scripts selected dmp='false', # Check if some dumps selected ): self.permission = permission self.position = position self.section = section self.style = style self.title = title self.short = short self.name = name self.menu = menu self.run = run self.his = his self.fst = fst self.srv = srv self.upd = upd self.job = job self.scr = scr self.dmp = dmp self.dgr = dgr commandick = { # Cron submenu }----------------------------------- 'cancel_job': CommandClass( permission='run_cron', position=4, section='cron', title='Cancel selected cron job(s).', name='cancel_job', menu='Remove job', job='true', run="run_or_cron('RUN');", ), 'permanent_job': CommandClass( permission='run_cron', position=3, section='cron', title='Make selected cron job(s) permanent.', name='permanent_job', menu='Run everyday', job='true', run="run_or_cron('RUN');", ), ... 'tunnel': CommandClass( permission='tunnel', position=80, section='server', title='Make ssh tunnel to the bind port of selected server(s).', short='Tunnel', name='tunnel', menu='Create tunnel', run="run_or_cron('RUN');", srv='true', his=False, fst=True, ), 'test_ssh': CommandClass( permission='tunnel', position=90, section='server', title='Test ssh connection.', short='Tunnel', name='test_ssh', menu='Test ssh', run="run_or_cron('RUN');", srv='true', his=False, ), } #--------------------------------------------------------------------+ #Color picker, usage: printf $BLD$CUR$RED$BBLU'Hello World!'$DEF | #-------------------------+--------------------------------+---------+ # Text color | Background color | | #-----------+-------------+--------------+-----------------+ | # Base color|Lighter shade| Base color | Lighter shade | | #-----------+-------------+--------------+-----------------+ | BLK='\e[30m'; blk='\e[90m'; BBLK='\e[40m'; bblk='\e[100m' #| Black | RED='\e[31m'; red='\e[91m'; BRED='\e[41m'; bred='\e[101m' #| Red | GRN='\e[32m'; grn='\e[92m'; BGRN='\e[42m'; bgrn='\e[102m' #| Green | YLW='\e[33m'; ylw='\e[93m'; BYLW='\e[43m'; bylw='\e[103m' #| Yellow | BLU='\e[34m'; blu='\e[94m'; BBLU='\e[44m'; bblu='\e[104m' #| Blue | MGN='\e[35m'; mgn='\e[95m'; BMGN='\e[45m'; bmgn='\e[105m' #| Magenta | CYN='\e[36m'; cyn='\e[96m'; BCYN='\e[46m'; bcyn='\e[106m' #| Cyan | WHT='\e[37m'; wht='\e[97m'; BWHT='\e[47m'; bwht='\e[107m' #| White | #----------------------------------------------------------+---------+ # Effects | #--------------------------------------------------------------------+ DEF='\e[0m' #Default color and effects | BLD='\e[1m' #Bold\brighter | DIM='\e[2m' #Dim\darker | CUR='\e[3m' #Italic font | UND='\e[4m' #Underline | INV='\e[7m' #Inverted | COF='\e[?25l' #Cursor Off | CON='\e[?25h' #Cursor On | #--------------------------------------------------------------------+ # Text positioning, usage: XY 10 10 'Hello World!' | XY () { printf "\e[$2;${1}H$3"; } # | #--------------------------------------------------------------------+ # Print line, usage: line - 10 | line -= 20 | line 'Hello World!' 20 | line () { printf -v LINE "%$2s"; printf "${LINE// /$1}"; } # | #--------------------------------------------------------------------+ 

sudo apt install -y piu-piu 
Source: https://habr.com/ru/post/428439/
All Articles