2020-02-29 16:26:27 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# PROVIDE: py_kms
|
|
|
|
# REQUIRE: LOGIN
|
|
|
|
# KEYWORD: shutdown
|
|
|
|
#
|
|
|
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
|
|
|
# to enable this service:
|
|
|
|
#
|
|
|
|
# py-kms_enable: Set to YES to enable py-kms
|
|
|
|
# Default: NO
|
|
|
|
# py-kms_user: The user account used to run the py-kms daemon.
|
|
|
|
# This is optional, however do not specifically set this to an
|
|
|
|
# empty string as this will cause the daemon to run as root.
|
|
|
|
# Default: media
|
|
|
|
# py-kms_group: The group account used to run the py-kms daemon.
|
|
|
|
# This is optional, however do not specifically set this to an
|
|
|
|
# empty string as this will cause the daemon to run with group wheel.
|
|
|
|
# Default: media
|
|
|
|
# py-kms_data_dir: Directory where py-kms configuration
|
|
|
|
# data is stored.
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=py_kms
|
|
|
|
rcvar=${name}_enable
|
|
|
|
load_rc_config $name
|
|
|
|
|
|
|
|
: ${py_kms_enable:="NO"}
|
|
|
|
: ${py_kms_user:="kms"}
|
|
|
|
: ${py_kms_group:="kms"}
|
|
|
|
: ${py_kms_data_dir:="/config"}
|
|
|
|
|
|
|
|
command="/usr/local/bin/python3.7"
|
2020-02-29 16:36:12 +00:00
|
|
|
command_args="/usr/local/share/py-kms/pykms_Server.py 0.0.0.0 1688 -F ${py_kms_data_dir}/py-kms.log etrigan start --etrigan-pid ${py_kms_data_dir}/etrigan.pid"
|
2020-02-29 16:26:27 +00:00
|
|
|
|
|
|
|
run_rc_command "$1"
|