#!/bin/bash

SERVICES="networking.service ifup@.service"

> /etc/network/interfaces

for service in ${SERVICES};do
    if [ $(systemctl is-enabled ${service}) != 'masked' ];then
        systemctl reset-failed ${service} > /dev/null 2>&1
        systemctl stop ${service} > /dev/null 2>&1
        systemctl disable ${service} > /dev/null 2>&1
        systemctl mask ${service} > /dev/null 2>&1
    fi
done

exit 0

