Category Archives: Various

LetsEncrypt request certificate error

Invalid host in redirect target “subdomain.domain.io.well-known”

When you get this error while requesting a new certificate you probably have a wrong redirect statement in your apache configuration.

The “redirect permanent” in the port 80 section should end with a / (or remove this entry while requesting a new certificate)

Share

VirtualMin error regarding can_use_gcloud_storage_creds 

After a fresh install of Ubuntu 22.04 and VirtualMin I tried to restore some WordPress sites to my new server. Created a backup on the old server. Next logged into the new server and in VirtualMin navigated to VirtualMin -> Backup and Restore -> Restore Virtual Servers. On this page I got the error as shown below.

HTTP/1.0 500 Perl execution failed Server: MiniServ/2.021 Date: Fri, 21 Apr 2023 07:11:21 GMT Content-type: text/html; Charset=utf-8 Connection: close

ERROR — PERL EXECUTION FAILED
Undefined subroutine &virtual_server::can_use_gcloud_storage_creds called at /usr/share/webmin/virtual-server/cloud-lib.pl line 304.

Not sure what causes this but it has something to do with the google cloud sdk not being installed on the server i suspect. I do not need this so I opend the cloud-lib.pl file in folder /usr/share/webmin/virtual-server/ and modified the perl code as a work around. Replace the function cloud_google_get_state with the definition below:

sub cloud_google_get_state
{
   return { 'ok' => 0 };
}

Next wait for a fix from VirtualMin.

Share

OpenELEC installation on the Raspberry PI

A short blog post about setting up your Raspberry PI and openElec. Nothing difficult just some basic instructions to get the PI up and running.

openELec on the Pi

First download the OpenELEC Raspbian image here. Then place your SD card in your computer; unmount it with (determine the name of the SD card with the command diskutil list )

Use the raw version of the disk to speed up writing. So instead of using /dev/diskN use /dev/rdiskN

diskutil unmountDisk /dev/<disk>

Then unzip the zip file you have just downloaded and write the included img file to the SD card with the command:

sudo dd bs=1m if=path_of_your_image.img of=/dev/diskn

This takes a long while to complete. On Mac OS X you can type Ctrl+T in the terminal window where you executed the dd command to check progress.

After the image is written to the SD card place it in your PI and go ahead and fire up your Raspberry PI.

Share

Configure crond on your PlayonHD from A.C. Ryan

OLYMPUS DIGITAL CAMERATwo weeks ago I bought a PlayonHD put together by A.C. Ryan. When I bought the box I was not aware of the fact that I bought a little Unix box. It turns out that you can telnet to the box and have a complete Linux system at your hands: it is called BusyBox.
Knowing that, I was wondering, if it was possible to backup (part of) the internal harddrive (2TB) periodical to a USB connected harddrive.

I knew this should be possible with the crond deamon; this tool takes care for executing a command every given time.

Out of the box my Playonhd Busybox version did not have a crond deamon compiled in. Luckily I could find one on the internet here (use save as and copy onto your PlayonHD).

For a list of commands available within the BusyBox you use take a look here.

The crond file should be created in

/tmp/spool/cron/crontabs/[uname]

uname is probably root.

Example contents (every minute a echo to the specified file; take a look here to examine the crontab file format):

* * * * * echo “some text” >> /var/crondtest_bdej

Start the crond daemon with:

./busybox1.16.1 crond

(execute this in the diretcory where your new busybox bin is saved.

Now instead of this simple echo comand specify your copy commands here and voila; you can automatically backup your data to a USB drive.

To share your USB drive on the network edit your SAMBA configuration file; this file is stored at /usr/local/etc/package/samba/lib and is called smb.conf

Add the following to the end of the configuration file

[USB1]
path=/tmp/usbmounts/sdb1
hide dot files=yes
hide files=/.*/lost+found/
guest ok=yes
writable=yes
force create mode=0775
force directory mode=0775

The USB drive is visible on the network with the name USB1.

Share