Category: Technology


Systemd conditional restart / reload

A company I contract for recently upgraded their servers to Centos 7, which means we’re now in the world of Systemd instead of SysVinit.

It turns out that Systemd doesn’t have facilities to handle conditional restarts of a service. Reloads can be made to work with multiple ExecReload commands.

I did a decent amount of digging and in all the threads I found one maintainer, in particular, was staunchly against adding the capability to Systemd. I can only posit he doesn’t do work in the real world where this is a necessity and not just a nice to have. But seriously, would it be that hard to ExecRestartPre?

A solution was needed and this is what I came up with. I’m putting it out there in case anyone else might find it useful.

Our needs were fairly … Read More »

– Jamie @ 10:29 AM on Jan 24, 2018
Comments [0]

Apache + SVN Access Restrictions

We had a situation where we needed to provide authenticated access to our SVN repo from most places, but needed anonymous read access from a select few IPs. Turns out this was harder to figure out than I expected. I thought this would have been a solved problem, but after a lot of Googling I couldn’t find any solutions. I’m documenting this here in case someone else runs up against this and needs a solution.

I initially tried using an Apache ‘If’ in the config to specify different SVN access files, but for some reason this didn’t work. I couldn’t get good information from debug, but it appeared the correct file was passed to AuthzSVN, however for the authenticated access we’d get a 403 Forbidden error after authenticating. Anonymous access worked. The two access files were the same except for one … Read More »

– Jamie @ 6:44 PM on Mar 24, 2017
Comments [0]

Smart(phone) Controls

I use my phone a lot in the car to listen to music and podcasts. With subsonic I have full access to my entire music catalog which makes it a no brainer to use instead of fooling with CDs.  However I found myself really missing having physical buttons to control pause, play, and track skipping.  Aside from the convenience, it was also a little dangerous for me to be messing with my phone while driving.  Inevitably, I would end up hitting the wrong button, and that would be an even bigger distraction.

I knew headphones were sold that provided some external controls for phones so I did a little digging and came across this post where someone had already solved my problem.

I ordered the parts and when they came in I got my breadboard, alligator cables, etc. and brought it all to McDonald’s and spent … Read More »


– Jamie @ 12:50 PM on Jun 7, 2012
Comments [0]

Before Cloud Music Was Cool

Before cloud music was even a blip on the radar.  I was frustrated with the state of the art: syncing music to my devices.  I have a pretty big music catalog and it has never been possible to sync it all to a single device.  When I was traveling I’d have to decide just what it was I thought I’d want to listen to. Inevitable, I’d want to hear something I didn’t bring along.  That sent me in search of a solution, and that’s when I stumbled across subsonic.  It’s a donationware application that allows for streaming music from your home network to the Internet.  It has some cool features.  It can convert any audio format (assuming you have the right libraries) to mp3 so you don’t have to worry about device compatibly.   It can resample to lower bit rates … Read More »


– Jamie @ 9:36 AM on Jun 5, 2012
Comments [0]

Man In The Middle

I got pulled into a problem at work yesterday. The issue is that some people (randomly) begin experiencing one-way audio on a phone call that moments before had been working fine. Packet captures revealed that when the problem occurs the audio stream makes it all the way to the IP phone, but fails to be played on the user’s handset. A colleague had analyzed the data and found an anomaly around the time the audio stopped working; the RTP timestamp in the packet jumped significantly. The working theory was that maybe the phone was confused by the time jump which caused it to quit playing the audio. It felt like a plausible theory, but it also felt like it could be a red herring.

The obvious thing would be to reproduce in a controlled environment to … Read More »

– Jamie @ 10:37 AM on Jul 31, 2009