void-service-control/VoidServiceControl/env.py

23 lines
368 B
Python
Raw Normal View History

2024-03-25 02:20:41 +00:00
# -*- coding: utf-8 -*-
2024-03-25 03:45:03 +00:00
from os import environ
2024-03-25 02:37:45 +00:00
2024-03-25 03:45:03 +00:00
# Edit these lines if you are using custom paths to Runit services
2024-03-25 02:37:45 +00:00
2024-03-25 02:20:41 +00:00
SV_PATH = '/etc/sv'
ENABLED_PATH = '/var/service'
2024-03-25 03:45:03 +00:00
# Lang settings
def lang() -> str:
"""
Get system lang
:return: system lang
"""
try:
return environ["LANG"][:5]
except KeyError:
return "en_US"
LANG = lang()