Exemplo n.º 1
0
        open('/proc/mounts').close()
    except:
        print(
            "Please execute the following command\n  sudo snap connect jans-server:mount-observe :mount-observe\nbefore running setup. Exiting ..."
        )
        sys.exit()

# initialize config object
Config.init(paths.INSTALL_DIR)
Config.determine_version()

# we must initilize SetupUtils after initilizing Config
SetupUtils.init()

# get setup options from args
argsp, setupOptions = get_setup_options()

terminal_size = shutil.get_terminal_size()
tty_rows = terminal_size.lines
tty_columns = terminal_size.columns

if not argsp.n:
    base.check_resources()

# pass progress indicator to Config object
Config.pbar = jansProgress

for key in setupOptions:
    setattr(Config, key, setupOptions[key])

jansInstaller = JansInstaller()
Exemplo n.º 2
0
    try:
        open('/proc/mounts').close()
    except:
        print(
            "Please execute the following command\n  sudo snap connect jans-server:mount-observe :mount-observe\nbefore running setup. Exiting ...")
        sys.exit()

# initialize config object
Config.init(paths.INSTALL_DIR)
Config.determine_version()

# we must initilize SetupUtils after initilizing Config
SetupUtils.init()

# get setup options from args
setupOptions = get_setup_options()

terminal_size = shutil.get_terminal_size()
tty_rows = terminal_size.lines
tty_columns = terminal_size.columns

# check if we are running in terminal
try:
    os.get_terminal_size()
except:
    argsp.no_progress = True

if not argsp.n:
    base.check_resources()

# pass progress indicator to Config object