Fighting with WP-Cron for fun and Tumblr

With the recent announcement from Tumblr, many blogs are looking for places to move their history to. WordPress is one option, and the Tumblr Importer plugin makes that easy.

There is one gotcha. The import itself is done by a WP-Cron job, and that doesn’t work correctly on some server setups. This means that you will need to create a cronjob on the server (if using hosted WordPress) to run it.

On your server, in the shell,

First, create the directory for the output
mkdir ~/tmp

Then, in your crontab
*/1 * * * * curl -I http://YOUR_SITE_URL/wp-cron.php >> $HOME/tmp/out 2>&1

The cronjob will now be called  every minute and, depending on how far back your blogs goes, be imported in a few hours (plue/minus longer).

Reference: https://developer.wordpress.org/plugins/cron/hooking-into-the-system-task-scheduler/

Updating tor leads to keys, and ansible, and editors

Good Timezone!

Today I decided to dig into why my tor relays wouldn’t update. I mean, what else is there to do at 4 am when on vacation?

Good news. If I had a cron set up to renew the keys, I wouldn’t have run into issues. Better news, because I didn’t, I got to learn a bunch of new things regarding sysadmin.

First, How to update a repo’s apt signing keys. (much thanks to https://linux-audit.com/how-to-solve-an-expired-key-keyexpired-with-apt/)

Second, Ansible can do things locally. (https://docs.ansible.com/ansible/latest/user_guide/playbooks_delegation.html) Which is interesting to discover when you discover it’s looking for things on your local box, and not on the remote box where the commands run great manually.

Finally, git var (https://git-scm.com/docs/git-var) This is a really nice command when you can’t figure out why your commit editor is nano instead of vim and none of the envs mentioned in the man page for git-config seem to be set.