feature: the VPN, the router, the name server and WebDAV are components switched on the System tab and installed on demand, Caddy from the Ubuntu archive is a dependency and serves every HTTP and HTTPS port, HTTPS is chosen at install, its certificate is of the Servers Issuing CA or self-signed by default, of ACME or of another CA, the issuing CAs are in one tab, a locked account is unlocked again, the name of a CA is fixed once the CA exists, and a run of setup is no longer cut short by a change.
Release / release (push) Failing after 8s

This commit is contained in:
slawek committed 2026-11-24 05:51:27 +01:00
1 parent a649331aa2
commit a7bfabcb89
97 files changed
+4498 -1834

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env python3
"""Print the current TOTP code of a user of a Linux Manager VM: lm-dev-otp-code.py.
The code is the one of the key <vm>-<user> in the TOTP engine of the Vault of the project --project
(LXD_PROJECT, lm-dev by default), for --user (admin by default) of the VM --vm (lm-dev), which
lm-dev-otp-register.py or lm-dev-vm.py create enrolled.
"""
import argparse
import os
import sys
from lm_dev import PROJECT, VaultError, otp_code
def main():
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
parser.add_argument('--project', default=os.environ.get('LXD_PROJECT', PROJECT),
help=f'the project of the VM (LXD_PROJECT, default {PROJECT})')
parser.add_argument('--vm', default='lm-dev', help='the name of the VM (default lm-dev)')
parser.add_argument('--user', default='admin', help='the user (default admin)')
args = parser.parse_args()
try:
print(otp_code(args.project, args.vm, args.user))
except VaultError as error:
sys.exit(f'no code: {error}')
if __name__ == '__main__':
main()