acts on OS X

Small customizations

In my previous post about backups I mentioned that I customized acts to work on OS X. It turned out those changes were not that big and only one was related to the OS X itself.

Local config

By default acts expects its config file to be system wide, installed either in /etc/acts.conf or /usr/local/ect/acts.conf. It’s perfectly valid default but I wanted to keep the configuration file in my home directory, which is also the thing which I want to backup.

The change required adding three lines of code to the beginning of the acts script:

if [[ ... ]]
    # ...
elif [ -f $HOME/.acts.conf ] ; then
    . $HOME/.acts.conf
    log_debug "load-config source=$HOME/.acts.conf"

The change on GitHub.

Run file

Because acts is expected to be run by root, by default it creates lockfile in /var/run directory. My need of running it as my regular user meant that I had to modify that default. It required two steps.

First was to create directory in /var/run which will be writable by my user:

$ sudo mkdir /var/run/acts
$ sudo chown $USER: /var/run/acts

The second step is easy thanks to acts being flexible enough to look for lockfile setting in the environment. This meant that to change it I only had to invoke it with the extra stuff:

$ lockfile=/var/run/acts/acts.lock acts

Configuration file

Last required change, to accommodate the difference between Linux and OSX was with the default tarsnap command in the configuration file. It used two commands: nice and ionice to make sure that tarsnap will not take too much of the resources.

Unfortunately ionice is not available on OS X.

The simplest change would be to just remove it from the command and mark it as done. On the other hand, it is possible to to make the config file compatible with both Linux and OS X. Small bash conditional

if type ionice > /dev/null 2>&1 ; then
    ionice="ionice -c3"
tarsnap="nice -n19 $ionice tarsnap"

That way, if ionice is available on the system it will be used. Otherwise, it’s skipped from the tarsnap invocation.


The changes required to make acts work on my system were tiny. It shows how well it is written.

It has been a month since I started using it and it works perfectly.

If anyone is interested my changes are on GitHub.