#!/bin/sh -e
echo "restart daemon ..."
result=0
systemctl daemon-reload
if [ $? -ne 0 ]; then
    result=1
fi
systemctl restart sockets.target
if [ $? -ne 0 ]; then
    result=1
fi

if [ $result -eq 0 ]; then
    echo "restart daemon OK"
    exit $result
else
    echo "restart daemon failed"
    exit $result
fi
