Archive of

Late March News

Written by Simone

Hello!

Last "real" post was about 2 months ago.. I got busy with stuff at home but also made a lot of adjustments here and there at @wpn. Let me list the most important ones:

  • Set up shell and email users' homes backup: archives are still stored on the VPS for the time being, till when I'll find another proper backup location.
  • Cleaned up /var/www/ and nginx virtualhosts; also removed "Shaarli", since I wasn't really using it anymore.
  • Added a new board on the main site for BitTorrent, reachable here: https://woodpeckersnest.space/board/torrents
  • Upgraded XMPP Prosody server to 13.0.0 and isolated anon webchat even more, so that those users won't be able to connect to Biboumi IRC gateway.
  • Upgraded all #slixmpp powered bots to 1.10, released only yesterday
  • Formatted (again) the 2 pdf files regarding @wpn's Term of Use and Privacy Notice (no rules updates though)

I think that's about it.. probably 😀 I'm definitely forgetting something.

Some other news: a few new users joined XMPP and more than a few logged in our Movim COMMutiny pod. Welcome Aboard everyone! Be Nice!!

I'm keeping the pod up-to-date as much as I can (it's running on master branch), but that also mean I have to restart it sometimes; I will try to do that only during weekends from now on.. promise.

And now I'd better get going again.. See you soon!

Scheduled Maintenance

Written by Simone

😎

Notes

Written by Simone

I'll update this post whenever I see fits, A.K.A. when I have other bits of information which don't require a whole post.

Operations on files and directories

Move files to the current/parent directory in Linux

Current dir

find . -type f -exec mv {} . \;

Parent dir

find . -type f -exec mv {} .. \;

Recursive chmod on files and dirs

To change all the directories to 755 (-rwxr-xr-x):

find /var/www/blog -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r--r--):

find /var/www/blog -type f -exec chmod 644 {} \;

Certbot

Certbot cli

/etc/letsencrypt/cli.ini

When renewing, use the same private key as the existing certificate. (default: False):

reuse-key = True

Common commands

Register single domain:

certbot certonly --standalone -d domain.tld --dry-run
  • Remove “–dry-run” when ok.

Renew single domain:

certbot renew --cert-name domain.tld --dry-run
  • Remove “–dry-run” when ok.

Delete single domain:

certbot delete --cert-name domain.tld
  • Cannot use "--dry-run" in this case.

Revoke certificate:

certbot revoke --cert-path /etc/letsencrypt/archive/${YOUR_DOMAIN}/cert1.pem

Check certificate's expiry date:

cat /etc/letsencrypt/live/domain.tld/cert.pem | openssl x509 -noout -enddate

GIT

To reset your git repository to given commit id, do:

git reset --hard <commit-id>
git push origin master --force

Ignoring files that are already tracked

git update-index --assume-unchanged <your file here>

Delta Chat Mail sieve

require ["fileinto"];
# rule:[DeltaChat]
if header :contains "Chat-Version" "1.0"
{
	fileinto "DeltaChat";
	stop;
}

Postfix mail queue

To view postfix mail queue in case of problems and remove a particular message from it, do as follows:

# mailq

-Queue ID-  --Size-- ----Arrival Time---- -Sender/Recipient-------
6DCF32201B*    4824 Thu Oct 19 22:54:44  roughnecks@woodpeckersnest.eu
                                         debian@spacenet.it

-- 4 Kbytes in 1 Request.
# postsuper -d 6DCF32201B

postsuper: 6DCF32201B: removed
postsuper: Deleted: 1 message

To delete all emails in the queue, use this command:

# postsuper -d ALL

Check Preferred Outgoing IP (when multiple are set on <interface>)

curl ifconfig.me

The correct command to add a new Linux user (in this case without a shell)

adduser --shell /usr/sbin/nologin <username>

I always forget which command is the complete one, useradd or adduser

Packages management with apt and aptitude

Finding currently installed "external" packages (not from stable repo)

# aptitude search "?narrow(?installed,?not(?archive(stable)))"
i   containerd.io              - An open and reliable container runtime
i   docker-buildx-plugin       - Docker Buildx cli plugin.
i   docker-ce                  - Docker: the open-source application container engine
i   docker-ce-cli              - Docker CLI: the open-source application container engine
i A docker-ce-rootless-extras  - Rootless support for Docker.
i   docker-compose-plugin      - Docker Compose (V2) plugin for the Docker CLI.

In the above example, "i" means installed and "A" means it was automatically installed, such as a dependency. I'm running upstream docker.

This is another package that I have installed from sid and set on "hold":

# apt-cache policy toot
toot:
  Installed: 0.45.0-1
  Candidate: 0.45.0-1
  Version table:
 *** 0.45.0-1 100
        100 /var/lib/dpkg/status
     0.34.1-1 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages
        500 http://deb.debian.org/debian bookworm/main i386 Packages

bookworm version of toot is rather old, as you can see.