#!/bin/sh
# Sundtek Media Framework

case "$1" in
	hibernate|suspend)
		echo `date +"%Y-%m-%d %H:%M:%S [$$]"`" Stopping driver system is going into suspend/standby" >> /var/log/mediasrv.log
		/opt/bin/mediaclient --shutdown
		;;
	thaw|resume) 
		echo `date +"%Y-%m-%d %H:%M:%S [$$]"`" Restarting driver after system resume" >> /var/log/mediasrv.log
		/opt/bin/mediaclient --start
		;;
	*) exit $NA
		;;
esac
