Revert "AMBARI-8333. Ambari-agent restart fails on Ubuntu. (aonishuk)"

This reverts commit 0e25a431b8c840cdb6455147108289e787035271.