liesislukas / shell-scripts

These are mostly my own built scripts to make things happen. Some are updated by people I hired to check my mess πŸŽ‰

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

shell-scripts 😱

These are mostly my own built scripts to make things happen. Some are updated by people I hired to check my mess πŸŽ‰

Most of these things are copied from trafikito agent code, which is hosted here: https://github.com/Trafikito/agent

Functions 🧐

  • log.sh - exposes 2 functions fn_log and fn_debug. also manages logs file.
  • fn_promt.sh - confirm action with Y/n and then run if statement by result
  • fn_install_tools.sh - when need to check if some tools are available and if not - try to install it or ask user to do it for you. Defined function fn_install_tools which is compatible with Debian, RedHat, Alpine, Arch and SuSE package managers. Defines all tools needed with some description for user then loops through required tools and tries to install if is root, if not - makes a list for user and prints out. Uses custom fn_promt.sh which can be found in this repo to confirm action.
  • fn_select_edge.sh - defines default and then pings several URLs to get the fastest edge available.
  • fn_download.sh - It's from Trafikito agent installation. It has a list of files to be downloaded from API endpoint and it just tries to get it. Has some retry mechanism in case of network issues.
  • fn_set_os.sh - this will set variables os, os_codename, os_release and centos_flavor
  • fn_send_error.sh - function to log and send an error to API endpoint

Else 🀯

About

These are mostly my own built scripts to make things happen. Some are updated by people I hired to check my mess πŸŽ‰


Languages

Language:Shell 100.0%