kool_newt

@[email protected]

Trying to spread the idea that humans need to evolve beyond our current stage based on mutual exploitation and learn to again live on this planet sustainably and without coercion.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

kool_newt,

What are you some sort of corporate apologist?

Even if you’re right, the idea that a company has to treat people and communities poorly due to it’s size just means companies that size should not be allowed to exist at all.

kool_newt,

What if I wrote a script and shared it that allowed me to have a chat like experience but worked by sending each other SSH commands? Would that script be illegal? Will they make SSH illegal or force backdoors in it?

kool_newt,

So you essentially claim humans are basically “bad” (willing to harm others for unnecessary gain), and maybe there are a few good people but it doesn’t matter?

I think you can more accurately say that human nature is to cooperate and share and there are a few psychopaths that fuck things up when allowed to gain power (and implement their extractive tooling like capitalism).

bookshop.org/p/books/…/15873078

kool_newt, (edited )

That’s a bit of a reductive take on the parent comment.

Sure, but that was my intention, to distill the essence which I think I did fairly well. Was I wrong?

Human nature to cooperate and share is not mutually exclusive with forming in-groups and out-groups.

Agree, but that doesn’t mean it isn’t in our nature to also cooperate and trade amongst groups rather than default to making enemies. Humans forming groups/tribes etc doesn’t imply that those tribes have to have exploitative interactions.

As a maybe silly analogy, thing of two families visiting Disneyland together. They maintain group membership, the parents only buy lunch for their own children, as the other kid’s parent’s can provide for them fine. But they enjoy the day together, and maybe buy each other treats. Then they go home to their separate homes, to maybe cooperate on another day.

But then think of two families where each has a psychopath that has effectively gained control of the family. Then the Disneyland trip is less likely to happen, especially being fun, even if the rest of the family is the same. Instead, there might distrust, competition, and attempts at exploitation between the families.

Which one of the above scenarios is “human nature”? Both? What’s the difference? Resource contention and/or effective psychopaths preventing cooperation IMO (sorry I keep editing).

kool_newt,

Ah, maybe so, I’m definitely not immune to mischaracterizing on occasion.

kool_newt,

Bvzzzt… pew pew pew …Bvzzt

kool_newt,

You say I’m crazy? When I went to your schools…

kool_newt,

He was told he had a duty to the nation, but he misheard.

Is the blockchain an interesting innovation, aside from cryptocurrencies ?

For a long time, I thought of the blockchain as almost synonymous with cryptocurrencies, so as I saw stuff like “Odyssey” and “lbry” appearing and being “based on the blockchain”, my first thought was that it was another crypto scam. Then, I just got reminded of it and started looking more into it, and it just seemed...

kool_newt,

I see blockchain technology and it’s potential as analogous to a globally shared spreadsheet where nobody can go back and change history.

Now, just imagine what billions of humans could do if they could all work on the same spreadsheets without needing to trust each other.

  • Many financial institutions would be unnecessary
  • Ownership can be verified without need of paper and it’s risks of destruction, or trusting corporate computer networks. This applies to houses and boats just as much to movies and songs. Imagine commodity/utility music streaming validating your ownership of music via NFT ownership, not locked down by Apple, Amazon, or anyone else?
kool_newt,

A simple database has trust issues – the blockchain IS this database with trust issues resolved.

kool_newt,

I remember when our aparment’s old naked man got taken away. It brought everyone out and and we made friends and started hanging out regularly.

Thanks old naked dude! (jk he was a perv who knocked on women’s doors naked)

kool_newt,

Things take time, progress ebbs and flows. I think there’s a critical mass of good content and interesting people here and over time people will use it more. Just keep participating and ignoring the corporate sites.

For example, the friends that started using Reddit because of me are still on Reddit, but I’m pretty sure they’ll find their way here. Change isn’t something that everyone jumps on.

kool_newt,

Debian needs to focus more on automation if they want more penetration in the enterprise. Debian feels made for human admins logging in and managing things old school style which is fine for a few machines. Modern enterprises use Ansible etc and need highly functional non-interactive ways to install and configure etc. Preseed and Apt leave something to be desired here.

kool_newt,

A distro can make automation more difficult than it needs to be. As I mentioned in my examples, Preseed sucks, have you ever used it? And of course Ansible works on pretty much any distro, but Debian family distros are made with the expectation of user input, such as expecting configuration values during package installation and this has to be worked around. It’s not impossible, just more work and testing. When you’re automating CentOS and Ubuntu next to each other, you’ll realize extra Ubuntu related code.

Not a big deal, it’s just minor preferences.

kool_newt,

Well if it’s gonna be THAT kinda party, then I’m gonna stick my dick in the mashed potatoes!

kool_newt,

The rulers figured out the internet is too dangerous to their power. They thought they could control it and us, and they did for a long time, but it’s not working anymore. Now they are cracking down on our ability to communicate, to prevent ideas from spreading and taking hold that they cannot tolerate.

kool_newt,

Maybe, but capitalism has been the case the entire time, why is social media globally melting down in 2023?

Also, spying laws are not necessarily effective at containing the spread of ideas.

kool_newt,

Oh my bad, obviously there are no ultra wealthy people with power boners able to use their fortunes to get their way.

kool_newt,

I’m not speaking of socialist revolution. There’s a whole spectrum between licking boots and socialist revolution that is mostly ignored online. There are many ways people can threaten power, even just using Lemmy instead of Reddit. Here the conversations and our attention are not directed by profit and power seeking interests.

kool_newt,

No, never, but that’s not necessarily the biggest problem. I think the algorithms were a bigger problem, and we don’t have that here (at least not secret profit driven ones).

ajsadauskas, to technology
@ajsadauskas@aus.social avatar

So Elon's a "visionary" who wants to turn X into a single website where you can do everything — kinda like Yahoo!

He wants his new MySpaceX portal to be a website...

Where you can message people: https://en.m.wikipedia.org/wiki/Yahoo!_Messenger

Where you can stream audio: https://en.m.wikipedia.org/wiki/Broadcast.com

Where you can stream videos: https://en.m.wikipedia.org/wiki/Yahoo!_Screen

Where you can create social media posts: https://en.m.wikipedia.org/wiki/Yahoo!_360%C2%B0

Where you can manage your finances: https://en.m.wikipedia.org/wiki/Yahoo!_Finance

Where you can share photos: https://en.m.wikipedia.org/wiki/Yahoo!_Photos

Where you can earn money publishing content: https://en.m.wikipedia.org/wiki/Yahoo!_Publisher_Network

Where you can find a job: https://en.m.wikipedia.org/wiki/Yahoo!_HotJobs

Where you can buy and sell stuff: https://en.m.wikipedia.org/wiki/Yahoo!_Auctions

Yes, ladies and gentlemen, this truly is a vision for the future — if by "the future" you mean 1997.

#tech #technology #twitter #X #musk #ElonMusk @technology #yahoo

kool_newt,

And a bunch of items you really don’t want to order even if they are technically on the menu.

kool_newt,

I’m gonna start calling it “Xhoo!”

kool_newt,

I like it

kool_newt,

I made my own bash script that uses rsync. I stopped using Github so here’s a paste lol.

I define the backups like this, first item is source, other items on that line are it’s exclusions.

<pre style="background-color:#ffffff;">
<span style="color:#323232;">/home/shared
</span><span style="color:#323232;">/home/jamie     tmp/ dj_music/ Car_Music_USB
</span><span style="color:#323232;">/home/jamie_work
</span><span style="color:#323232;">
</span>
<pre style="background-color:#ffffff;">
<span style="color:#323232;">#!/usr/bin/ssh-agent /bin/bash
</span><span style="color:#323232;">
</span><span style="color:#323232;"># chronicle.sh
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Get absolute directory chronicle.sh is in
</span><span style="color:#323232;">REAL_PATH=`(cd $(dirname "$0"); pwd)`
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Defaults
</span><span style="color:#323232;">BACKUP_DEF_FILE="${REAL_PATH}/backup.conf"
</span><span style="color:#323232;">CONF_FILE="${REAL_PATH}/chronicle.conf"
</span><span style="color:#323232;">FAIL_IF_PRE_FAILS='0'
</span><span style="color:#323232;">FIXPERMS='true'
</span><span style="color:#323232;">FORCE='false'
</span><span style="color:#323232;">LOG_DIR='/var/log/chronicle'
</span><span style="color:#323232;">LOG_PREFIX='chronicle'
</span><span style="color:#323232;">NAME='backup'
</span><span style="color:#323232;">PID_FILE='~/chronicle/chronicle.pid'
</span><span style="color:#323232;">RSYNC_OPTS="-qRrltH --perms --delete --delete-excluded"
</span><span style="color:#323232;">SSH_KEYFILE="${HOME}/.ssh/id_rsa"
</span><span style="color:#323232;">TIMESTAMP='date +%Y%m%d-%T'
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Set PID file for root user
</span><span style="color:#323232;">[ $EUID = 0 ] && PID_FILE='/var/run/chronicle.pid'
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Print an error message and exit
</span><span style="color:#323232;">ERROUT () {
</span><span style="color:#323232;">    TS="$(TS)"
</span><span style="color:#323232;">    echo "$TS $LOG_PREFIX (error): $1"
</span><span style="color:#323232;">    echo "$TS $LOG_PREFIX (error): Backup failed"
</span><span style="color:#323232;">    rm -f "$PID_FILE"
</span><span style="color:#323232;">    exit 1
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Usage output
</span><span style="color:#323232;">USAGE () {
</span><span style="color:#323232;">cat << EOF
</span><span style="color:#323232;">USAGE chronicle.sh [ OPTIONS ]
</span><span style="color:#323232;">
</span><span style="color:#323232;">OPTIONS
</span><span style="color:#323232;">    -f path   configuration file (default: chronicle.conf)
</span><span style="color:#323232;">    -F        force overwrite incomplete backup
</span><span style="color:#323232;">    -h        display this help
</span><span style="color:#323232;">EOF
</span><span style="color:#323232;">exit 0
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Timestamp
</span><span style="color:#323232;">TS ()
</span><span style="color:#323232;">{
</span><span style="color:#323232;">    if
</span><span style="color:#323232;">        echo $TIMESTAMP | grep tai64n &>/dev/null
</span><span style="color:#323232;">    then
</span><span style="color:#323232;">        echo "" | eval $TIMESTAMP
</span><span style="color:#323232;">    else
</span><span style="color:#323232;">        eval $TIMESTAMP
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Logger function
</span><span style="color:#323232;"># First positional parameter is message severity (notice|warn|error)
</span><span style="color:#323232;"># The log message can be the second positional parameter, stdin, or a HERE string
</span><span style="color:#323232;">LOG () {
</span><span style="color:#323232;">    local TS="$(TS)"
</span><span style="color:#323232;">    # local input=""
</span><span style="color:#323232;">
</span><span style="color:#323232;">    msg_type="$1"
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # if [[ -p /dev/stdin ]]; then
</span><span style="color:#323232;">    #     msg="$(cat -)"
</span><span style="color:#323232;">    # else
</span><span style="color:#323232;">        shift
</span><span style="color:#323232;">        msg="${@}"
</span><span style="color:#323232;">    # fi
</span><span style="color:#323232;">    echo "$TS chronicle ("$msg_type"): $msg"
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Logger function
</span><span style="color:#323232;"># First positional parameter is message severity (notice|warn|error)
</span><span style="color:#323232;"># The log message canbe stdin or a HERE string
</span><span style="color:#323232;">LOGPIPE () {
</span><span style="color:#323232;">    local TS="$(TS)"
</span><span style="color:#323232;">    msg_type="$1"
</span><span style="color:#323232;">    msg="$(cat -)"
</span><span style="color:#323232;">    echo "$TS chronicle ("$msg_type"): $msg"
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Process Options
</span><span style="color:#323232;">while
</span><span style="color:#323232;">    getopts ":d:f:Fmh" options; do
</span><span style="color:#323232;">        case $options in
</span><span style="color:#323232;">            d ) BACKUP_DEF_FILE="$OPTARG" ;;
</span><span style="color:#323232;">            f ) CONF_FILE="$OPTARG" ;;
</span><span style="color:#323232;">            F ) FORCE='true' ;;
</span><span style="color:#323232;">            m ) FIXPERMS='false' ;;
</span><span style="color:#323232;">            h ) USAGE; exit 0 ;;
</span><span style="color:#323232;">            * ) USAGE; exit 1 ;;
</span><span style="color:#323232;">    esac
</span><span style="color:#323232;">done
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Ensure a configuration file is found
</span><span style="color:#323232;">if
</span><span style="color:#323232;">    [ "x${CONF_FILE}" = 'x' ]
</span><span style="color:#323232;">then
</span><span style="color:#323232;">    ERROUT "Cannot find configuration file $CONF_FILE"
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Read the config file
</span><span style="color:#323232;">. "$CONF_FILE"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Set the owner and mode for backup files
</span><span style="color:#323232;">if [ $FIXPERMS = 'true' ]; then
</span><span style="color:#323232;">#FIXVAR="--chown=${SSH_USER}:${SSH_USER} --chmod=D770,F660"
</span><span style="color:#323232;">FIXVAR="--usermap=*:${SSH_USER} --groupmap=*:${SSH_USER} --chmod=D770,F660"
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Set up logging
</span><span style="color:#323232;">
</span><span style="color:#323232;">if [ "${LOG_DIR}x" = 'x' ]; then
</span><span style="color:#323232;">    ERROUT "(error): ${LOG_DIR} not specified"
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">mkdir -p "$LOG_DIR"
</span><span style="color:#323232;">LOGFILE="${LOG_DIR}/chronicle.log"
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Make all output go to the log file
</span><span style="color:#323232;">exec >> $LOGFILE 2>&1
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Ensure a backup definitions file is found
</span><span style="color:#323232;">if
</span><span style="color:#323232;">    [ "x${BACKUP_DEF_FILE}" = 'x' ]
</span><span style="color:#323232;">then
</span><span style="color:#323232;">    ERROUT "Cannot find backup definitions file $BACKUP_DEF_FILE"
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Check for essential variables
</span><span style="color:#323232;">VARS='BACKUP_SERVER SSH_USER BACKUP_DIR BACKUP_QTY NAME TIMESTAMP'
</span><span style="color:#323232;">for var in $VARS; do
</span><span style="color:#323232;">    if [ ${var}x = x ]; then
</span><span style="color:#323232;">        ERROUT "${var} not specified"
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">done
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">LOG notice "Backup started, keeping $BACKUP_QTY snapshots with name "$NAME""
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Export variables for use with external scripts
</span><span style="color:#323232;">export SSH_USER RSYNC_USER BACKUP_SERVER BACKUP_DIR LOG_DIR NAME REAL_PATH
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Check for PID
</span><span style="color:#323232;">if
</span><span style="color:#323232;">    [ -e "$PID_FILE" ]
</span><span style="color:#323232;">then
</span><span style="color:#323232;">    LOG error "$PID_FILE exists"
</span><span style="color:#323232;">    LOG error 'Backup failed'
</span><span style="color:#323232;">    exit 1
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Write PID
</span><span style="color:#323232;">touch "$PID_FILE"
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Add key to SSH agent
</span><span style="color:#323232;">ssh-add "$SSH_KEYFILE" 2>&1 | LOGPIPE notice -
</span><span style="color:#323232;">
</span><span style="color:#323232;"># enhance script readability
</span><span style="color:#323232;">CONN="${SSH_USER}@${BACKUP_SERVER}"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Make sure the SSH server is available
</span><span style="color:#323232;">if
</span><span style="color:#323232;">    ! ssh $CONN echo -n ''
</span><span style="color:#323232;">then
</span><span style="color:#323232;">    ERROUT "$BACKUP_SERVER is unreachable"
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Fail if ${NAME}.0.tmp is found on the backup server.
</span><span style="color:#323232;">if
</span><span style="color:#323232;">    ssh ${CONN} [ -e "${BACKUP_DIR}/${NAME}.0.tmp" ] && [ "$FORCE" = 'false' ]
</span><span style="color:#323232;">then
</span><span style="color:#323232;">    ERROUT "${NAME}.0.tmp exists, ensure backup data is in order on the server"
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Try to create the destination directory if it does not already exist
</span><span style="color:#323232;">if
</span><span style="color:#323232;">    ssh $CONN [ ! -d $BACKUP_DIR ]
</span><span style="color:#323232;">then
</span><span style="color:#323232;">    if
</span><span style="color:#323232;">        ssh $CONN mkdir -p "$BACKUP_DIR"
</span><span style="color:#323232;">        ssh $CONN chown ${SSH_USER}:${SSH_USER} "$BACKUP_DIR"
</span><span style="color:#323232;">    then :
</span><span style="color:#323232;">    else
</span><span style="color:#323232;">        ERROUT "Cannot create $BACKUP_DIR"
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Create metadata directory
</span><span style="color:#323232;">ssh $CONN mkdir -p "$BACKUP_DIR/chronicle_metadata"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
</span><span style="color:#323232;"># PRE_COMMAND
</span><span style="color:#323232;">
</span><span style="color:#323232;">if
</span><span style="color:#323232;">    [ -n "$PRE_COMMAND" ]
</span><span style="color:#323232;">then
</span><span style="color:#323232;">    LOG notice "Running ${PRE_COMMAND}"
</span><span style="color:#323232;">    if
</span><span style="color:#323232;">        $PRE_COMMAND
</span><span style="color:#323232;">    then
</span><span style="color:#323232;">        LOG notice "${PRE_COMMAND} complete"
</span><span style="color:#323232;">    else
</span><span style="color:#323232;">        LOG error "Execution of ${PRE_COMMAND} was not successful"
</span><span style="color:#323232;">        if [ "$FAIL_IF_PRE_FAILS" -eq 1 ]; then
</span><span style="color:#323232;">            ERROUT 'Command specified by PRE_COMMAND failed and FAIL_IF_PRE_FAILS enabled'
</span><span style="color:#323232;">        fi
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
</span><span style="color:#323232;"># Backup
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Make a hard link copy of backup.0 to rsync with
</span><span style="color:#323232;">if [ $FORCE = 'false' ]; then
</span><span style="color:#323232;">    ssh $CONN "[ -d ${BACKUP_DIR}/${NAME}.0 ] && cp -al ${BACKUP_DIR}/${NAME}.0 ${BACKUP_DIR}/${NAME}.0.tmp"
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">while read -u 9 l; do
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # Skip commented lines
</span><span style="color:#323232;">    if [[ "$l" =~ ^#.* ]]; then
</span><span style="color:#323232;">    continue
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">    if [[ $l = '/*'* ]]; then
</span><span style="color:#323232;">        LOG warn "$SOURCE is not an absolute path"
</span><span style="color:#323232;">        continue
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # Reduce whitespace to one tab
</span><span style="color:#323232;">    line=$(echo $l | tr -s [:space:] 't')
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # get the source
</span><span style="color:#323232;">    SOURCE=$(echo "$line" | cut -f1)
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # get the exclusions
</span><span style="color:#323232;">    EXCLUSIONS=$(echo "$line" | cut -f2-)
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # Format exclusions for the rsync command
</span><span style="color:#323232;">    unset exclude_line
</span><span style="color:#323232;">    if [ ! "$EXCLUSIONS" = '' ]; then
</span><span style="color:#323232;">        for each in $EXCLUSIONS; do
</span><span style="color:#323232;">            exclude_line="$exclude_line--exclude $each "
</span><span style="color:#323232;">        done
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">    LOG notice "Using SSH transport for $SOURCE"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # get directory metadata
</span><span style="color:#323232;">    PERMS="$(getfacl -pR "$SOURCE")"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # Copy metadata
</span><span style="color:#323232;">    ssh $CONN mkdir -p ${BACKUP_DIR}/chronicle_metadata/${SOURCE}
</span><span style="color:#323232;">    echo "$PERMS" | ssh $CONN -T "cat > ${BACKUP_DIR}/chronicle_metadata/${SOURCE}/metadata"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">    LOG debug "rsync $RSYNC_OPTS $exclude_line "$FIXVAR" "$SOURCE" 
</span><span style="color:#323232;">    "${SSH_USER}"@"$BACKUP_SERVER":"${BACKUP_DIR}/${NAME}.0.tmp""
</span><span style="color:#323232;">
</span><span style="color:#323232;">    rsync $RSYNC_OPTS $exclude_line $FIXVAR "$SOURCE" 
</span><span style="color:#323232;">    "${SSH_USER}"@"$BACKUP_SERVER":"${BACKUP_DIR}/${NAME}.0.tmp"
</span><span style="color:#323232;">
</span><span style="color:#323232;">done 9< "${BACKUP_DEF_FILE}"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
</span><span style="color:#323232;"># Try to see if the backup succeeded
</span><span style="color:#323232;">
</span><span style="color:#323232;">if
</span><span style="color:#323232;">    ssh $CONN [ ! -d "${BACKUP_DIR}/${NAME}.0.tmp" ]
</span><span style="color:#323232;">then
</span><span style="color:#323232;">    ERROUT "${BACKUP_DIR}/${NAME}.0.tmp not found, no new backup created"
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Test for empty temp directory
</span><span style="color:#323232;">if
</span><span style="color:#323232;">    ssh $CONN [ ! -z "$(ls -A ${BACKUP_DIR}/${NAME}.0.tmp 2>/dev/null)" ]
</span><span style="color:#323232;">then
</span><span style="color:#323232;">    ERROUT "No new backup created"
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
</span><span style="color:#323232;"># Rotate
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Number of oldest backup
</span><span style="color:#323232;">X=`expr $BACKUP_QTY - 1`
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">LOG notice 'Rotating previous backups'
</span><span style="color:#323232;">
</span><span style="color:#323232;"># keep oldest directory temporarily in case rotation fails
</span><span style="color:#323232;">ssh $CONN [ -d "${BACKUP_DIR}/${NAME}.${X}" ] && 
</span><span style="color:#323232;">ssh $CONN mv "${BACKUP_DIR}/${NAME}.${X}" "${BACKUP_DIR}/${NAME}.${X}.tmp"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Rotate previous backups
</span><span style="color:#323232;">until [ $X -eq -1 ]; do
</span><span style="color:#323232;">    Y=$X
</span><span style="color:#323232;">    X=`expr $X - 1`
</span><span style="color:#323232;">
</span><span style="color:#323232;">    ssh $CONN [ -d "${BACKUP_DIR}/${NAME}.${X}" ] && 
</span><span style="color:#323232;">    ssh $CONN mv "${BACKUP_DIR}/${NAME}.${X}" "${BACKUP_DIR}/${NAME}.${Y}"
</span><span style="color:#323232;">    [ $X -eq 0 ] && break
</span><span style="color:#323232;">done
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Create "backup.0" directory
</span><span style="color:#323232;">ssh $CONN mkdir -p "${BACKUP_DIR}/${NAME}.0"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Get individual items in "backup.0.tmp" directory into "backup.0"
</span><span style="color:#323232;"># so that items removed from backup definitions rotate out
</span><span style="color:#323232;">while read -u 9 l; do
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # Skip commented lines
</span><span style="color:#323232;">    if [[ "$l" =~ ^#.* ]]; then
</span><span style="color:#323232;">    continue
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # Skip invalid sources that are not an absolute path"
</span><span style="color:#323232;">    if [[ $l = '/*'* ]]; then
</span><span style="color:#323232;">        continue
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">    # Reduce multiple tabs to one
</span><span style="color:#323232;">    line=$(echo $l | tr -s [:space:] 't')
</span><span style="color:#323232;">
</span><span style="color:#323232;">    source=$(echo "$line" | cut -f1)
</span><span style="color:#323232;">
</span><span style="color:#323232;">    source_basedir="$(dirname $source)"
</span><span style="color:#323232;">
</span><span style="color:#323232;">    ssh $CONN mkdir -p "${BACKUP_DIR}/${NAME}.0/${source_basedir}"
</span><span style="color:#323232;">
</span><span style="color:#323232;">    LOG debug "ssh $CONN cp -al "${BACKUP_DIR}/${NAME}.0.tmp${source}" "${BACKUP_DIR}/${NAME}.0${source_basedir}""
</span><span style="color:#323232;">
</span><span style="color:#323232;">    ssh $CONN cp -al "${BACKUP_DIR}/${NAME}.0.tmp${source}" "${BACKUP_DIR}/${NAME}.0${source_basedir}"
</span><span style="color:#323232;">
</span><span style="color:#323232;">done 9< "${BACKUP_DEF_FILE}"
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Remove oldest backup
</span><span style="color:#323232;">X=`expr $BACKUP_QTY - 1` # Number of oldest backup
</span><span style="color:#323232;">ssh $CONN rm -Rf "${BACKUP_DIR}/${NAME}.${X}.tmp"
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Set time stamp on backup directory
</span><span style="color:#323232;">ssh $CONN touch -m "${BACKUP_DIR}/${NAME}.0"
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Delete temp copy of backup
</span><span style="color:#323232;">ssh $CONN rm -Rf "${BACKUP_DIR}/${NAME}.0.tmp"
</span><span style="color:#323232;">
</span><span style="color:#323232;">#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
</span><span style="color:#323232;"># Post Command
</span><span style="color:#323232;">
</span><span style="color:#323232;">if
</span><span style="color:#323232;">    [ ! "${POST_COMMAND}x" = 'x' ]
</span><span style="color:#323232;">then
</span><span style="color:#323232;">    LOG notice "Running ${POST_COMMAND}"
</span><span style="color:#323232;">    if
</span><span style="color:#323232;">        $POST_COMMAND
</span><span style="color:#323232;">    then
</span><span style="color:#323232;">        LOG notice "${POST_COMMAND} complete"
</span><span style="color:#323232;">    else
</span><span style="color:#323232;">        LOG warning "${POST_COMMAND} complete with errors"
</span><span style="color:#323232;">    fi
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Delete PID file
</span><span style="color:#323232;">rm -f "$PID_FILE"
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Log success message
</span><span style="color:#323232;">LOG notice 'Backup completed successfully'
</span><span style="color:#323232;">
</span>
kool_newt,

When it comes to billionaires, never attribute to stupidity which can be adequately explained by malice.

I’m finding it hard to believe these billionaires are legitimately just making that poor of decisions that happen to be causing significant destruction to major social media platforms.

But then again, elon’s kid’s name is a great counter example. How the fuck am I not a gazillionaire? Oh right, no family emerald mine.

kool_newt,

I love me some DuckTales!

kool_newt,

I think they’re a bit off. Taco warning is clearly taco. Taco watch would be like corn tortilla and avocado getting a little too close, closer than they’d need to be in non-taco situations.

kool_newt,

Check out Crystal, it’s like static typed Ruby.

Self hosted SSH key repository?

I have too many machines floating around, some virtual, some physical, and they’re getting added and removed semi-frequently as I play around with different tools/try out ideas. One recurring pain point is I have no easy way to manage SSH keys around them, and it’s a pain to deal with adding/removing/cycling keys. I know I...

kool_newt,

Are you initiating SSH connections from all these hosts?

If you just need to SSH to these hosts, use a single key and copy the public key only to the hosts you need to connect to. If you don’t want to copy the pubkeys to target hosts, use LDAP + SSSD or certificates.

Then, if you do need to initiate connections from these hosts and use an SSH agent you can forward your agent and SSH to another host

<pre style="background-color:#ffffff;">
<span style="color:#323232;">client> ssh -A host1
</span><span style="color:#323232;">host1> ssh host2
</span><span style="color:#323232;">host2>
</span>
<pre style="background-color:#ffffff;">
<span style="color:#323232;">client> ssh -A host1
</span><span style="color:#323232;">host1> ssh -A host2
</span><span style="color:#323232;">host2> ssh -A host3
</span><span style="color:#323232;">host3> 
</span>
kool_newt,

This is a common pattern, typically called a “jump host” or “bastion host”.

a script to cat my priv key through the relay

When it comes to security, I typically recommend against rolling your own. SSH already has agent forwarding option to do this securely and the -J option to accomplish the same without even needing to forward the key. The agent can seem complex at first, it’s actually pretty simple and worth learning.

Feel free to message me if you have more questions, I’ve got lots of experience w/ SSH.

kool_newt,

I think -J is newer and may not work if you have distro versions older than like 5 years (eg. Centos 7 or before). There is a less convenient syntax that does the same thing though

$ ssh -o ProxyCommand=“ssh -W %h:%p bastion-host” remote-host

See: www.redhat.com/…/ssh-proxy-bastion-proxyjump

kool_newt,

I find myself to be a stereotypical Lemmy user. I’m trans, (anarcho-) communist, a programmer and Linux engineer.

I’m older, I transitioned (ugh I hate that word) about 2 decades ago. I got into computers consciously and very intentionally. I knew I’d need to support myself soon and spent a good amount of time thinking what industries or companies might be willing to hire someone like me (this was even before trans people had employment rights in California!). I chose computers because I felt like it was an industry where someone might hire me, I could make enough to survive and pay for surgery, and because it seemed one where my co-workers would be less likely to beat me up or kill me.

When it comes to communism, I have a hunch that being trans forces you to think about society and why you are not accepted, who is causing your troubles and why. It seems apparent why someone so low on the social acceptance ladder as a trans person would be repelled by exploitation based zero-sum systems and attracted to systems that would allow them to survive and thrive.

Linux seemed just fundamentally awesome to me. You mean people could just choose to get together, coordinate, and build one of the most complex things to exist on the planet and give it away for free? Sign me up! I think Lemmy and the Fediverse are attractive for similar reasons.

kool_newt,

You’re conflating communism with authoritarianism.

kool_newt, (edited )

I’m not sure, I just cringe every time I have to say it. I guess it’s just kinda like referring to one’s puberty as “blossoming” and feeling cringe when talking to friends and you’re like, “…before I blossomed …”. In that case you’d more likely say “when I was a kid”, but I don’t want to say “when I was a dude” lol.

It’s just a personal thing, no issues with the word or those who use it/like it. I don’t have a word I prefer.

kool_newt,

This makes sense, transition also implies I changed from one thing to another, which is how it appears externally I suppose but for me it was more like being let out of a prison where personal expression suddenly became possible. I didn’t change so much as people just started being able to seeing the whole me for the first time.

kool_newt,

This would be great for avocados too, just sans plastic.

kool_newt,

For anyone that used Atom, check out

pulsar-edit.dev

Fuck microsoft

kool_newt,

I’ve used Atom for years and rarely had issues. Maybe a specific plugin was causing you a problem? Either way, I’d say give Pulsar a try if you like that type of interface.

kool_newt,

Oh nice! I was super excited to find your project, was not about to let MS drive me into their arms and couldn’t find anything else that met my needs.

Thanks for your work!

Google is working on essentially putting DRM on the web (github.com)

The much maligned “Trusted Computing” idea requires that the party you are supposed to trust deserves to be trusted, and Google is DEFINITELY NOT worthy of being trusted, this is a naked power grab to destroy the open web for Google’s ad profits no matter the consequences, this would put heavy surveillance in Google’s...

kool_newt,

I’m working on essentially removing Google from my life.

kool_newt,

I don’t let perfection be the enemy of progress.

kool_newt,

Oh really? Is this from like not having to contact google analytics for every action?

kool_newt,

I’ve always had an aversion to corporate anything so I’m already part way there. Use DDG half the time, Firefox user since it was called Firebird!. I really just need to drop Gmail and use DDG or others full time. I’m finding parting with gmail difficult and scary though as over a decade of history and old friends that may know that address as my only contact.

kool_newt,

Oh this is a great half-way step.

kool_newt,

Does pooping frequency correlate with intelligence? What about pooping duration? I can drop a deuce and return and not drop a beat in our conversation.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • Ask_kbincafe
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines