fix(script): minor fixes

This commit is contained in:
Lucky Bassi 2023-12-15 13:29:50 +01:00
parent 892c94581b
commit 7e1d9d9cce
1 changed files with 4 additions and 2 deletions

View File

@ -121,9 +121,11 @@ echo ""
read -p "Apply this network configuration? [yes/no]: " apply_conf
if [[ $apply_conf == [Yy]* ]]; then
mv /etc/network/interfaces /etc/network/interfaces.old
mv interfaces /etc/network/interfaces
timestamp=$(date +%Y%m%d-%H%M%S)
mv /etc/network/interfaces /etc/network/interfaces.bak-$timestamp
mv /tmp/new_interfaces /etc/network/interfaces
echo "The network can be restarted with the following command: /etc/init.d/networking restart"
else
echo "Exiting without applying changes."
rm /tmp/new_interfaces
fi