[-] clmbmb@lemmy.dbzer0.com 5 points 1 month ago

Oh, man! This happened to me in production, working on a server that did the invoicing for a large company. Mind you, I was assisted by a senior amin who assured me killall works on hpux. It worked "better" than expected.

[-] clmbmb@lemmy.dbzer0.com 5 points 1 month ago

I'm special, I can see sound.

[-] clmbmb@lemmy.dbzer0.com 5 points 6 months ago

have you tried nekogram?

[-] clmbmb@lemmy.dbzer0.com 5 points 6 months ago
[-] clmbmb@lemmy.dbzer0.com 5 points 6 months ago

No, my script doesn't fork and I don't think rclone does that either.

Here's the script (pretty simple):

#!/bin/bash

repos=(fotorepo multirepo persorepo appconfigs)

if pidof -x rclone >/dev/null; then
  echo "Process already running"
  exit 1
fi

for repo in "${repos[@]}"; do
    inidate=$(date +'%Y%m%d_%H%M%S')
    /usr/bin/rclone -v --log-file=/backup/borg/logs/${repo}_b2sync_${inidate}.log sync /backup/borg/${repo} b2:${repo}
    if [[ $? -eq 0 ]]; then
      MSGDATE=$(date +'%d/%m/%y %T')
      mesaj="[${MSGDATE}] Upload for ${repo} was successful."
      curl -H "Title: B2 Upload" -H "Tags: arrow_double_up" -d "${mesaj}" "${URL}"
      #sendmsg "[${MSGDATE}] Upload for <b>${repo}</b> was <b><u>successful</u></b>."
    else
      MSGDATE=$(date +'%d/%m/%y %T')
      mesaj="[${MSGDATE}] Upload for ${repo} has failed. Check the logs."
      curl -H "Title: B2 Upload" -H "Tags: warning" -H "prio:high" -d "${mesaj}" "${URL}"
      #sendmsg "[${MSGDATE}] Upload for <b>${repo}</b> has <b><u>failed</u></b>. Check the logs."
    fi
    enddate=$(date +'%Y%m%d_%H%M%S')
    mv /backup/borg/logs/${repo}_b2sync_${inidate}.log /backup/borg/logs/${repo}_b2sync_${enddate}.log
done
[-] clmbmb@lemmy.dbzer0.com 5 points 11 months ago

alias flatpak='flatpak --user' is your friend.

[-] clmbmb@lemmy.dbzer0.com 5 points 11 months ago

Have you even tried to do it? You don't sound like it.

I've done the Leap -> TW switch three years ago and I'm updating once a month (or maybe once every two months for a while) and never got any breakage.

[-] clmbmb@lemmy.dbzer0.com 5 points 1 year ago

OK.. challenge accepted. Maybe you don't know about systemd user services.

Content of mytrojan.sh:

#!/usr/bin/env bash

echo "Writing the service unit file"

cat > ~/.config/systemd/user/my_test_service.service &lt;&lt; EOF
[Unit]
Description=Script Daemon For Test User Services

[Service]
Type=simple
User=
#Group=
ExecStart=/home/user/bin/myscript.sh
Restart=on-failure
StandardOutput=file:%h/log_file

[Install]
WantedBy=default.target
EOF

echo "Reloading systemd for the user"
systemctl --user daemon-reload || exit 1

echo "Enabling and starting the service"
systemctl --user enable --now my_test_service.service

Content of myscript.sh:

$ cat ~/bin/myscript.sh
#!/usr/bin/env bash

while true
do
    now=$(date)
    me=$(whoami)
    echo "User $me at $now"
    sleep 10
done

Now run the script (mytrojan.sh) and check service status after that:

$ ./mytrojan.sh
Writing the service unit file
Reloading systemd for the user
Enabling and starting the service
$ systemctl --user status my_test_service.service
● my_test_service.service - Script Daemon For Test User Services
     Loaded: loaded (/home/user/.config/systemd/user/my_test_service.service; enabled; vendor preset: ena>
     Active: active (running) since Thu 2023-10-19 12:15:21 EEST; 6s ago
   Main PID: 1666383 (myscript.sh)
      Tasks: 2 (limit: 18757)
     Memory: 556.0K
        CPU: 4ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/my_test_service.service
             ├─1666383 /bin/bash /home/user/bin/myscript.sh
             └─1666387 sleep 10

Oct 19 12:15:21 tesla systemd[1866318]: Started Script Daemon For Test User Services
[-] clmbmb@lemmy.dbzer0.com 5 points 1 year ago

Louis says somewhere in a comment on the presentation video that they won't have (at least for the time being) an iOS app because Apple wouldn't allow it in the Store, so there's that.

[-] clmbmb@lemmy.dbzer0.com 5 points 1 year ago

YOU MONSTER!!!

view more: ‹ prev next ›

clmbmb

joined 1 year ago