#!/bin/sh
set -e

if [ "$2" = "hibernate" ] || [ "$2" = "hybrid-sleep" ]; then
    case "$1" in
        post)
            swapoff /swap-hibinit
            systemctl restart systemd-networkd
            ;;
    esac
fi
