diff --git a/storjstatus/storjstatus_register.py b/storjstatus/storjstatus_register.py index c67fb623ca1cac3cb9950a57b6c83064e6c6f462..cb66564d7dea480ef9c02c8afcfdedaf7ab378ba 100644 --- a/storjstatus/storjstatus_register.py +++ b/storjstatus/storjstatus_register.py @@ -97,20 +97,21 @@ def init_register(): def checks(): global FORCE - if storjstatus_common.get_os_type() == "x": + if storjstatus_common.get_os_type() == "linux": + try: + if os.geteuid() != 0: + print_error('Please run this script with root privileges.') + except AttributeError: + print_error('Error checking user access level.') + elif storjstatus_common.get_os_type() == "win": + try: + if ctypes.windll.shell32.IsUserAnAdmin() != 1: + print_error('Please run this script with Administrator privileges.') + except AttributeError: + print_error('Error checking user access level.') + else: print_error('Unsupported Os type.') - try: - if os.geteuid() != 0: - print_error('Please run this script with root privileges.') - except AttributeError: - pass - try: - if ctypes.windll.shell32.IsUserAnAdmin() != 1: - print_error('Please run this script with Administrator privileges.') - except AttributeError: - print_error('Error checking user access level.') - if FORCE == True: print("Forcing regeneration of config and crontab. Note cron times may change.") diff --git a/storjstatus/version.py b/storjstatus/version.py index 73e3bb4f38bada34ca9359469effd05bb6767ac7..80eb7f98f4cb71200c816fc60695b1028924b01b 100644 --- a/storjstatus/version.py +++ b/storjstatus/version.py @@ -1 +1 @@ -__version__ = '0.3.2' +__version__ = '0.3.3'