replacing curl with wget

In the old days, curl was installed by default by a new installation and wget needed to be added.

Now it’s the other way around. I got fed up with this and figured out how to modify my old scripts to use wget.

open(CURLY, "/usr/bin/curl -kfs https://copier.lan/status/statgeneral.htm|")
    or die "Can't curl: $!";

curl writes to stdout by default. k for insecure https connection, f for fail silently, s for silent.

open(CURLY, "/usr/bin/wget --no-check-certificate -qO - https://copier.lan/status...
    or die "Can't curl: $!";

wget writes to a file by default. --no-check-certificate for insecure https connection, q for quiet, O - to write the data to stdout.

let’s encrypt: https_proxy systemd

On a Debian Stretch system at work, certbot was working but automatic renewals were not. The system is behind a proxy server and the https_proxy environment variable was not being set when certbot ran unattended.

I wasted several hours tinkering with /etc/cron.d/certbot before I realized that

0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew

was preventing certbot from running if systemd was running.

Edit /lib/systemd/system/certbot.service Add to the [Service] section:

Environment="https_proxy=https://my_proxy_server:port" "http_proxy=http://my_proxy_server:port"

systemctl daemon-reload

So that the file is actually read.

Docs on this file at man systemd.exec search Environment=

Debian 7: unknown filesystem type ‘iso9660’

(Tax time issue.) I burned a data CD on Debian 7 using Brasero. When I attempted to mount the data CD to verify that it was readable, I got an error: unknown filesystem type 'iso9660'. This was because iso9660 support was missing from my install. To solve this,

apt-get install fuseiso9660