#!/bin/bash

AF=/etc/aliases
if ! (grep '^root: admin@3gteam.hu$' $AF>/dev/null); then

	if (grep '^root:' $AF>/dev/null); then
		# we have root
		echo 'update'
		sed -Ei 's/^root:.*$/root: admin@3gteam.hu/' $AF
	else
		echo 'add'
		echo 'root: admin@3gteam.hu' >>$AF
	fi

	newaliases
else
	echo "already ok"
fi
