set --process-name-prefix

This commit is contained in:
Devaev Maxim 2019-10-11 23:43:59 +03:00
parent f8a4f59e13
commit 74449c81ad
10 changed files with 15 additions and 1 deletions

View File

@ -44,7 +44,7 @@ depends=(
make make
patch patch
raspberrypi-io-access raspberrypi-io-access
"ustreamer>=1.8" "ustreamer>=1.9"
) )
makedepends=(python-setuptools) makedepends=(python-setuptools)
source=("$url/archive/v$pkgver.tar.gz") source=("$url/archive/v$pkgver.tar.gz")

View File

@ -50,6 +50,7 @@ kvmd:
- "--unix-rm" - "--unix-rm"
- "--unix-mode=0660" - "--unix-mode=0660"
- "--exit-on-parent-death" - "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--no-log-colors" - "--no-log-colors"
ipmi: ipmi:

View File

@ -44,6 +44,7 @@ kvmd:
- "--unix-rm" - "--unix-rm"
- "--unix-mode=0660" - "--unix-mode=0660"
- "--exit-on-parent-death" - "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--no-log-colors" - "--no-log-colors"
ipmi: ipmi:

View File

@ -52,6 +52,7 @@ kvmd:
- "--unix-rm" - "--unix-rm"
- "--unix-mode=0660" - "--unix-mode=0660"
- "--exit-on-parent-death" - "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--no-log-colors" - "--no-log-colors"
ipmi: ipmi:

View File

@ -49,6 +49,7 @@ kvmd:
- "--unix-rm" - "--unix-rm"
- "--unix-mode=0660" - "--unix-mode=0660"
- "--exit-on-parent-death" - "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--no-log-colors" - "--no-log-colors"
ipmi: ipmi:

View File

@ -53,6 +53,7 @@ kvmd:
- "--unix-rm" - "--unix-rm"
- "--unix-mode=0660" - "--unix-mode=0660"
- "--exit-on-parent-death" - "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--no-log-colors" - "--no-log-colors"
ipmi: ipmi:

View File

@ -240,6 +240,8 @@ def _get_config_scheme() -> Dict:
"unix": Option("", type=valid_abs_path, only_if="!port", unpack_as="unix_path"), "unix": Option("", type=valid_abs_path, only_if="!port", unpack_as="unix_path"),
"timeout": Option(2.0, type=valid_float_f01), "timeout": Option(2.0, type=valid_float_f01),
"process_name_prefix": Option("kvmd/streamer"),
"cmd": Option(["/bin/true"], type=valid_command), "cmd": Option(["/bin/true"], type=valid_command),
}, },
}, },

View File

@ -62,6 +62,8 @@ class Streamer: # pylint: disable=too-many-instance-attributes
unix_path: str, unix_path: str,
timeout: float, timeout: float,
process_name_prefix: str,
cmd: List[str], cmd: List[str],
) -> None: ) -> None:
@ -86,6 +88,8 @@ class Streamer: # pylint: disable=too-many-instance-attributes
self.__unix_path = unix_path self.__unix_path = unix_path
self.__timeout = timeout self.__timeout = timeout
self.__process_name_prefix = process_name_prefix
self.__cmd = cmd self.__cmd = cmd
self.__streamer_task: Optional[asyncio.Task] = None self.__streamer_task: Optional[asyncio.Task] = None
@ -248,6 +252,7 @@ class Streamer: # pylint: disable=too-many-instance-attributes
host=self.__host, host=self.__host,
port=self.__port, port=self.__port,
unix=self.__unix_path, unix=self.__unix_path,
process_name_prefix=self.__process_name_prefix,
**self.__params, **self.__params,
) )
for part in self.__cmd for part in self.__cmd

View File

@ -13,6 +13,7 @@ RUN pacman -Syu --noconfirm \
libjpeg \ libjpeg \
libevent \ libevent \
libutil-linux \ libutil-linux \
libbsd \
python \ python \
python-pip \ python-pip \
python-tox \ python-tox \

View File

@ -20,4 +20,5 @@ kvmd:
- "--unix-rm" - "--unix-rm"
- "--unix-mode=0666" - "--unix-mode=0666"
- "--exit-on-parent-death" - "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--no-log-colors" - "--no-log-colors"