1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-12 09:34:50 +02:00

add HOSTNAME to config.permissions

This commit is contained in:
Nick Sweeting
2024-11-16 02:45:58 -08:00
parent b4a5da3ffd
commit 684a394cba

View File

@@ -3,6 +3,8 @@ __package__ = 'archivebox.config'
import os
import pwd
import sys
import socket
import platform
from rich import print
@@ -30,6 +32,7 @@ EGID = os.getegid()
SUDO_UID = int(os.environ.get('SUDO_UID', 0))
SUDO_GID = int(os.environ.get('SUDO_GID', 0))
USER: str = Path('~').expanduser().resolve().name
HOSTNAME: str = max([socket.gethostname(), platform.node()], key=len)
IS_ROOT = RUNNING_AS_UID == 0
IN_DOCKER = os.environ.get('IN_DOCKER', False) in ('1', 'true', 'True', 'TRUE', 'yes')