#!/bin/sh
exec 2>&1

if [ ! -e /var/log/couchpotato.log ]; 
then
	touch /var/log/couchpotato.log
	chmod 644 /var/log/couchpotato.log
	chown couchpotato:couchpotato /var/log/couchpotato.log
fi

exec > /var/log/couchpotato.log
exec chpst -ucouchpotato:couchpotato /usr/share/couchpotato/CouchPotato.py --data_dir=/var/lib/couchpotato 
