Building a Versatile Shell Script Template with Logging and Command Handling Creating reusable shell scripts can save a lot of time, especially when they’re structured to handle different commands, support logging, and track version history. Here i have provided a reference for a template structure for bash scripting. Hopefully I will continue to use this myself.
Step 1: Setting Up the Script Structure We start by creating a basic structure for the script, including:
Managing Multiple Monitors on Linux Mint with xrandr When using a Linux laptop with an external docking station, managing multiple monitors effectively can be challenging. If you often connect and disconnect external monitors, you may want a quick way to toggle between using only your laptop display and activating external monitors.
In this post, I will show a custom script using xrandr to streamline the process. The script has been tested in Linux Mint 22, which is running X11.
Hosting a Tor-Accessible Hugo Website with Docker In this guide, I will go over setting up a hidden service using Docker on an Ubuntu Linux host. This setup will use a simple Python HTTP server behind the Tor network to serve a Hugo static website. Docker will ensure both Tor and the web server remain operational and accessible through a .onion address.
Why use Python to host the web server and not NGINX, just wanted something easy to test.
Automating Agent and Log Forwarding to New Relic on Ubuntu In this post, we’ll walk through the steps to automate the installation and configuration of the New Relic Infrastructure agent on an Ubuntu system. Additionally, we’ll show how to dynamically configure log forwarding for all log files in the /var/log directory and its subdirectories.
This script has been tested on Ubuntu 22.04 LTS on ARM, but should work for other versions of Ubuntu.
Azure CLI on Linux Mint Today, I embarked on an exploration of Linux Mint as a potential new desktop environment. Linux Mint stands out as an operating system recognized for its robustness, user-centric design, and unparalleled stability. Its foundation on Ubuntu, which draws from Debian, positions Linux Mint as an exemplary choice for the Linux community. The system’s interface, celebrated for its elegance and simplicity and an extensive software repository, ensures a seamless user experience.
Linux Automation over SSH Linux Automation over SSH, a set of scripts designed for the deployment and configuration of headless Linux workstations and servers. Perfectly suited for creating development servers, this solution has been developed and tested on Raspberry Pi and Ubuntu VMs. It offers a streamlined approach using builtin tools to executing shell scripts remotely, ensuring secure and orderly operations. While it’s a boon for development environments, users are cautioned to handle secure passwords with care before deploying it in production settings.