mirror of
https://github.com/dragonlock2/matthewtran.com.git
synced 2026-06-28 01:58:34 +00:00
(wip) nas container
This commit is contained in:
+6
-4
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user