Select Page
Considerations

Considerations

One of the better reads these days being The Book of Chuang Tzu on which today i learned that Confucius is the Latinization of Kung Fu Tzu which in essence means Kung Fu Master (whaaaaat).

So, in the same lighthearted note, i will be updating this post, with the things i find along the way.

  • “… Does this mean Heaven originally created us for the sake of the mosquitoes, gnats, tigers, and wolves ?” – No, but in nature, everything eats. We just have lost the reverie and respect for nature’s offering.
  • In a certain book, there’s a certain logical reasoning about a certain family of a mother and her seven sons, that died for their beliefs. Although we can never know for sure, because we were not there, we don’t have any reasons to doubt the validity of this story.  The reasoning put forward here is that reason goes beyond emotion and feelings and they did “The right thing”. i’d like to offer another perspective: have you seen times when families of ducks follow if one of them gets lost in danger? Like if there’s this small waterfall and one of them falls, they would all sit around the edge and then willfully fall down too and get reunited? … Or die? You see this might be one of the reasons why if one is in a situation where someone has hurt their family in an irreparable way, and they are a witness to this, and if there is nothing they can do about it, then following in the footsteps of their sibling is the only reasonable way to go. How could one live without their family, knowing they backed off when others moved forward? i believe it’s something more than reasoning here and logical thinking, but the belief that the only way through is forward. Even if that means death. The only people who fear death are the ones who don’t respect it. We might fear the process of a violent death, which obviously is not desirable, but to fear a part of life is silly beyond means.
Guidelines for a human

Guidelines for a human

i thought it would be useful to have a few simple guidelines for a human, because in this life it’s fairly easy to build a life on rotten foundations, especially if people have been doing it for centuries, so here are a few.

  • You shouldn’t need to believe if you know.
  • [9/12/2023 12:53 PM] : you don’t believe in a fork
    [9/12/2023 12:53 PM] : you know the fork is there
    [9/12/2023 12:53 PM] : you don’t believe in a dog you’re petting
    [9/12/2023 12:53 PM] : you know the dog is there
    [9/12/2023 12:53 PM] : you don’t believe in spoons
    [9/12/2023 12:54 PM] : the spoons are there
    [9/12/2023 12:54 PM] : god is whether you believe or not.
    [9/12/2023 12:54 PM] : he doesn’t need you to believe
    [9/12/2023 12:54 PM] : so that brings a question
    [9/12/2023 12:54 PM] : why are all these books telling people they need to believe in something
    [9/12/2023 12:54 PM] : that is?
    [9/12/2023 12:54 PM] : when something is
    [9/12/2023 12:54 PM] : it doesn’t require anyone to believe in it
    [9/12/2023 12:54 PM] : a rock is there
    [9/12/2023 12:55 PM] : it is there whether you believe in it or not
    [9/12/2023 12:55 PM] : it doesn’t require your belief to exist
    [9/12/2023 12:55 PM] : the river is there and doesn’t need you to believe in it
    [9/12/2023 12:55 PM] : a tree is there
    [9/12/2023 12:55 PM] : whether you believe in it or not

There is no life, without death, in the same way, there is no death without life.

  • Anyone trying to instill fear of death shows no respect for life
  • Anyone using fear of death in order to get people to do anything, whether it be praying, kneeling, sacrificing innocent life, giving money, or creating rules for living, cannot be holy, because they are not whole.

webalizer analog awstats cleanup script on cPanel/WHM

i usually disable awstats analog and webalizer on cPanel/WHM because there’s much better alternatives out there, like Google Analytics, however if you’re doing it on a server that has been running them for a while now, the cached data remains, so here’s a script to clean that up:

#!/bin/bash -x
for i in $(ls /var/cpanel/users)
do
cd /home/${i}/tmp && rm -rf analog awstats webalizer
done

cPanel/WHM clear user logs script

Sometimes on cPanel/WHM the php user logs get large and/or might not get rotated properly. This script should take care of this

nano /root/logs.clear.sh

paste the contents below

chmod 700 logs.clear.sh

./root/logs.clear.sh

#!/bin/bash -x
for i in $(ls /var/cpanel/users)
do
cd /home/${i}/logs && find . -type f -name “*.php.error.log” -print0 | xargs -0 -I{} sh -c ‘echo “” > “{}”‘\;
done

redis – maintenance script

redis – maintenance script

Recently we had issues with Redis acting up, so i got this maintenance script going, that checks the Redis availability and resets it, if it becomes unavailable. Hope it helps

#!/bin/bash

LOG_FILE=”redis.log”

# Function to log a message with date and time
function log_message() {
local message=”$1″
echo “$(date ‘+%Y-%m-%d %H:%M:%S’) – $message” >> “$LOG_FILE”
}

# Function to check if Redis is running
function is_redis_running() {
redis_status=$(systemctl is-active redis.service 2>&1)
if [ “$redis_status” = “active” ]; then
return 0
else
return 1
fi
}

# Function to check if Redis is accepting operations
function is_redis_accepting_ops() {
if redis-cli set testkey 1 >/dev/null 2>&1 && [ “$(redis-cli get testkey)” = “1” ]; then
redis-cli del testkey >/dev/null 2>&1
return 0
else
return 1
fi
}

# Function to restart Redis
function restart_redis() {
sudo systemctl restart redis.service
}

# Main script
function main() {
if is_redis_running && is_redis_accepting_ops; then
echo “Redis is running and accepting operations.”
else
log_message “Redis is not running or not accepting operations. Restarting Redis…”
restart_redis

# Wait for Redis to start up (you may adjust the sleep time if needed)
sleep 5

if is_redis_running && is_redis_accepting_ops; then
log_message “Redis restarted successfully and is now accepting operations.”
else
log_message “Failed to restart Redis or Redis is still not accepting operations.”
fi
fi
}

#Run
while true
do
main
sleep 10
done

Pin It on Pinterest