post_install()
{
macs=$(ip link | awk '/link\/ether/ { print $2 }' )
mac=$(echo $macs | awk '{ print $1 }')

echo "MAC $mac"
sed -i "s/machine_id.*/machine_id=$mac/" /etc/canal/cando.conf

systemctl enable cando
systemctl restart cando

}

post_upgrade()
{
systemctl enable cando
systemctl restart cando

}

pre_remove()
{
systemctl stop cando
systemctl disable cando
}