#!/bin/sh

case "$1" in
    post)
        nm-online -s
        if [ $? -ne 0 ]; then
            echo "Network is not online. Exiting."
            exit 1
        else
            echo "Network is online. Proceeding with chronyc makestep."
            /usr/bin/chronyc makestep
        fi
        
        ;;
esac