Skip to content

Instantly share code, notes, and snippets.

@bradleyayers
Created April 26, 2012 21:26
Show Gist options
  • Save bradleyayers/2503351 to your computer and use it in GitHub Desktop.
Save bradleyayers/2503351 to your computer and use it in GitHub Desktop.
Load user jobs at boot.
author 'Bradley Ayers'
description 'Enables user job "start on" stanzas to be honored at boot'
task
start on starting rc-sysinit
script
cat /etc/passwd | while read line
do
user=`echo $line | cut -d: -f1`
home=`echo $line | cut -d: -f6`
if [ -d "$home/.init" ]
then
sudo -u $user initctl status rc-sysinit
fi
done
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment