#!/bin/sh
# Copyright 2011 Paul Parsons
# Distributed under the terms of the GNU General Public License v3 or later

depend="xorg"
service --depend ${depend} || exit 1

case $1 in
"start")
	unset RUNLEVEL
	[ -f /etc/profile.env ] && . /etc/profile.env
	daemon --start --label=$0 /usr/bin/pawm --display :0 --login user
	;;
"stop")
	daemon --stop --label=$0
	;;
esac

exit 0
