Spyke

Replies

linux

Comment on

Phoronix: Several Linux Kernel Driver Maintainers Removed Due To Their Association To Russia

it's a pity that politics is penetrating more and more into open source and FOSS.

recently support for Russian cloud providers was cut out of opentofu. https://github.com/opentofu/registry/pull/824

now this. this is, of course, natural the core and many components of modern distributions have not been free in terms of decision-making for a long time and are under the influence of large companies, which in turn are under the influence of the USA.

linux

Comment on

Phoronix: Several Linux Kernel Driver Maintainers Removed Due To Their Association To Russia

Linus Torvalds Confirms Decision to Remove Maintainers from Russia

You couldn't come up with a more powerful spit in the direction of FOSS. And from Linus, who is now kind of showing f*ck to the entire community. Here you have freedom, openness and all that. Today they just wiped their ass with it, and by one of the founders.

This is the moment when the split politics, dirty ones from all sides, have penetrated into the very heart of OpenSource - into the Linux kernel. https://www.youtube.com/watch?v=v_YozYt8l-g

firefox

Comment on

Mozilla’s response to proposed remedies in U.S. v. Google | The Mozilla Blog

independent browsers that exist due to agreements with search engines.

How independent are you if you take money from Google? Don't take money from Google and then maybe you'll become independent. But now you're looking at a kind of second-fresh independence. Maybe if it becomes the first, you will start attracting users instead of only repelling them and slamming doors. Because you got hooked on the needle of Google money and eventually lost all your users.

They fired a bunch of programmers. I sincerely wish them to go bankrupt and go to McDuck as waiters for 1.5 dollars an hour.

linux

Comment on

What is your linux backup strategy?

Example of a Bash script that performs the following tasks

  1. Checks the availability of an important web server.
  2. Checks disk space usage.
  3. Makes a backup of the specified directories.
  4. Sends a report to the administrator's email.

Example script:

#!/bin/bash

# Settings
WEB_SERVER="https://example.com"
BACKUP_DIR="/backup"
TARGET_DIRS="/var/www /etc"
DISK_USAGE_THRESHOLD=90
ADMIN_EMAIL="[email protected]"
DATE=$(date +"%Y-%m-%d")
BACKUP_FILE="$BACKUP_DIR/backup-$DATE.tar.gz"

# Checking web server availability
echo "Checking web server availability..."
if curl -s --head $WEB_SERVER | grep "200 OK" > /dev/null; then
echo "Web server is available."
else
echo "Warning: Web server is unavailable!" | mail -s "Problem with web server" $ADMIN_EMAIL
fi

# Checking disk space
echo "Checking disk space..."
DISK_USAGE=$(df / | grep / | awk '{ print $5 }' | sed 's/%//g')
if [ $DISK_USAGE -gt $DISK_USAGE_THRESHOLD ]; then
echo "Warning: Disk space usage exceeded $DISK_USAGE_THRESHOLD%!" | mail -s "Problem with disk space" $ADMIN_EMAIL
else
echo "There is enough disk space."
fi

# Creating backup
echo "Creating backup..."
tar -czf $BACKUP_FILE $TARGET_DIRS

if [ $? -eq 0 ]; then
echo "Backup created successfully: $BACKUP_FILE"
else
echo "Error creating backup!" | mail -s "Error creating backup" $ADMIN_EMAIL
fi

# Sending report
echo "Sending report to $ADMIN_EMAIL..."
REPORT="Report for $DATE\n\n"
REPORT+="Web server status: $(curl -s --head $WEB_SERVER | head -n 1)\n"
REPORT+="Disk space usage: $DISK_USAGE%\n"
REPORT+="Backup location: $BACKUP_FILE\n"

echo -e $REPORT | mail -s "Daily system report" $ADMIN_EMAIL

echo "Done."

Description:

  1. Check web server: Uses curl command to check if the site is available.
  2. Check disk space: Use df and awk to check disk usage. If the threshold (90%) is exceeded, a notification is sent.
  3. Create a backup: The tar command archives and compresses the directories specified in the TARGET_DIRS variable.
  4. Send a report: A report on all operations is sent to the administrator's email using mail.

How to use:

  1. Set the desired parameters, such as the web server address, directories for backup, disk usage threshold and email.
  2. Make the script executable:
chmod +x /path/to/your/script.sh
  1. Add the script to cron to run on a regular basis:
crontab -e

Example to run every day at 00:00:

0 0 * * * /path/to/your/script.sh