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

This reverts commit 02f535cf9ff204dd53f7d78272c07eb33ac4b532.