#!/bin/bash

. /usr/lib/pm-utils/functions

suspend() {
    # Send a signal to stop playback in elisa and totem media players
    pkill -SIGUSR1 -f "usr/bin/elisa"
    killall -SIGUSR1 totem
}

case "$1" in
        hibernate|suspend)
                suspend
                ;;
        *)
                ;;
esac

exit $?
