#!/bin/sh - # $Id: autocd-run-abcde,v 1.4 2006/10/08 00:11:58 sra Exp $ # # Quick hack to run abcde from autocd. # # This used to drop privs before ripping, but for some reason abcde # now wants to be root. Sigh. So this is nasty and dangerous, but # probably no more so than running the same program as root directly, # which is what I'd have to do without this hack. # # Some day I should figure out what's going on here and fix it. user=sra group=$user home=/u/$user/.mp3 /usr/bin/touch /tmp/autocd-run-abcde.last-ran PATH=/bin:/usr/bin:/usr/local/bin cd $home || exit ( exec >abcde.log.$$ 2>&1 /usr/local/bin/abcde -c /usr/local/etc/abcde.autocd.conf -N -d $1 -o mp3 -x /usr/sbin/chown -R $user:$group $home ) >/dev/null 2>&1 &