(wip) nas container

This commit is contained in:
Matthew Tran
2025-02-20 03:00:55 -08:00
parent e7b4e8aa46
commit 077178cbe0
8 changed files with 74 additions and 13 deletions
+6 -4
View File
@@ -1,13 +1,15 @@
#!/usr/bin/env python3
#!/usr/bin/sudo /usr/bin/python3
import os
import shutil
import subprocess
if __name__ == "__main__":
subprocess.run(["zip", "-FS", "-r", "data.zip",
out = "data.zip"
subprocess.run(["zip", "-FS", "-r", out,
"minecraft/worlds",
"minecraft_bedrock/worlds",
"terraria/worlds",
"terraria/password.txt",
"website/gitea",
"website/sendgrid.key",
], check=True)
shutil.chown(out, os.getlogin(), os.getlogin())
+4 -1
View File
@@ -4,7 +4,7 @@ import shutil
from pathlib import Path
if __name__ == "__main__":
# create folders in group "web" so containers have access
# create folders so containers have access
PATHS = {
"web": [
"website/certbot",
@@ -25,3 +25,6 @@ if __name__ == "__main__":
for p in PATHS[group]:
Path(p).mkdir(parents=True, exist_ok=True)
shutil.chown(p, group=group)
# TODO generate volumes to mount
# TODO generate users