mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-22 04:03:06 +00:00
add HOSTNAME to config.permissions
This commit is contained in:
parent
b4a5da3ffd
commit
684a394cba
1 changed files with 3 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue