#!/bin/sh

#/lib/systemd/system-sleep/moosefs-chunkserver

case $1 in
pre)
    /bin/systemctl stop moosefs-chunkserver.service

    ## Wait a little to notify master about graceful stop.
    ## This should help to put chunkserver into maintenance mode.
    /bin/sleep 2
;;
post)
    /bin/systemctl is-enabled moosefs-chunkserver.service \
    && /bin/systemctl start moosefs-chunkserver.service
;;
esac
