feat: add admin_token_hash attribute to dumpthings site-spec #5
1 changed files with 8 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ ExecStart=bash -c "PATH={user_home}/.local/bin:$PATH; \\
|
|||
--port {host_port} \\
|
||||
--config {config_filename} \\
|
||||
--root-path /api \\
|
||||
{admin_token_hash_args} \\
|
||||
{service_args} \\
|
||||
{user_home}/{data_dir} \\
|
||||
"
|
||||
|
|
@ -89,6 +90,7 @@ def deploy_sites():
|
|||
'systemd_service_params',
|
||||
'python_version',
|
||||
'dumpthings_version',
|
||||
'admin_token_hash',
|
||||
)
|
||||
}
|
||||
_deploy_site(
|
||||
|
|
@ -120,6 +122,7 @@ def _deploy_site(
|
|||
dumpthings_version: str | None = None,
|
||||
python_version: str | None = None,
|
||||
staticsite_root_dir: str | None = None,
|
||||
admin_token_hash: str | None = None,
|
||||
):
|
||||
user_name, uid = user_spec
|
||||
user_home = f'/home/{user_name}'
|
||||
|
|
@ -164,6 +167,11 @@ def _deploy_site(
|
|||
service_args=service_args or '',
|
||||
config_filename=config_file,
|
||||
data_dir=data_dir,
|
||||
admin_token_hash_args=(
|
||||
f'--admin-token-hash {admin_token_hash}'
|
||||
if admin_token_hash
|
||||
else ''
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue