#!/bin/bash

. /etc/pm/functions

case "$1" in
	hibernate|suspend)
		stopservice upsd
		;;
	thaw|resume)
		restartservice upsd
		;;
	*)
		;;
esac
