Skip to content
Snippets Groups Projects
Unverified Commit ad575508 authored by Max Adamo's avatar Max Adamo
Browse files

check if the user is root

parent 95a5b3ce
Branches
Tags v0.5.2
No related merge requests found
......@@ -88,6 +88,11 @@ def get_version(full_pkg_name):
if __name__ == '__main__':
if os.geteuid() != 0:
print("You need to have root privileges to run this script")
print("Please try again, this time using 'sudo'. Exiting.")
os.sys.exit()
CFG_ONE = os.path.join(
os.path.expanduser('~'), ".ubuntu-kernel-cleanup.ini")
CFG_TWO = '/etc/ubuntu-kernel-cleanup.ini'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment