How can I convert my Bash script output to JSON and save it as “.json” file?
Here is my script:
Get System info
#!/bin/bash
readarray -t array <<< "$(df -h)"
var=$(echo "${array[1]}"| grep -aob '%' | grep -oE '[0-9]+')
echo "${array[3]:$...
Bash Array – How to Declare an Array of Strings in a Bash Script
Bash scripts give you a convenient way to automate command line tasks. With Bash, you can do many of the same things you would do in other scripting or programming languages. You can create and use variables, execute loops, use conditional logic, and store data in arrays. While
Bash doesn't have a strong type system. To allow type-like behavior, it uses attributes that can be set by a command. ‘declare’ is a bash built-in command that allows you to update attributes applied to variables within the scope of your shell. In addition, it can be used to declare a variable in longhand. Lastly, it allows you to peek into variables.
When you get a certificate from Let’s Encrypt, our servers validate that you control the domain names in that certificate using “challenges,” as defined by the ACME standard. Most of the time, this validation is handled automatically by your ACME client, but if you need to make some more complex configuration decisions, it’s useful to know more about them. If you’re unsure, go with your client’s defaults or with HTTP-01.
Automating Let's Encrypt Certificate Renewal using DNS Challenge Type
In the following examples, I'll show how to renew certs with domains hosted on AWS/Route53 and GoDaddy. I run certbot with scripts within a docker container (to simplify automation), however you can use CLI.
Trouble setting up rfc2136 - Help - Let's Encrypt Community Support
My domain is: https://arenlor.com/ I ran this command: certbot certonly --rsa-key-size 4096 --staple-ocsp --server 'https://acme-v02.api.letsencrypt.org/directory' --dns-rfc2136 --dns-rfc2136-credentials /etc/letsencrypt/rfc2136.ini -d arenlor.com -d '*.arenlor.com' It produced this output: Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator dns-rfc2136, Installer None Obtaining a new certificate Performing the following challenges: dns-01 challenge for ar...
The sudoers file contains a set of rules that determines which users or groups are granted with sudo privileges as well as the level of the privileges.
Linux mkfifo Command Tutorial for Beginners (with Examples)
If youre even a moderate Linux command line user, you must be aware of pipes, a fundamental command line feature that allows processes to communicate...
How to scan for viruses with ClamAV on Ubuntu 22.04
There arent many viruses made for Linux distributions and as such, most people who use such systems dont even bother using antivirus software. Those...
Rate Limiting With nginx. This article explains how to use the nginx HttpLimitReqModule to limit the number of requests for a given session. This is u...