Compare commits
No commits in common. "21e3f1fc24f59edd25e995664f8fe4fbed26183e" and "3957c8f617531117e3dbf8fd2e1bf25d9d198978" have entirely different histories.
21e3f1fc24
...
3957c8f617
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
wget -4 -O /usr/local/bin/borg-linux64 $(curl -s https://api.github.com/repos/borgbackup/borg/releases/latest| jq -r '.assets | .[] | select(.name == "borg-linux64") | .browser_download_url')
|
||||
chmod -v +x /usr/local/bin/borg-linux64
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
cd "${0%/*}"
|
||||
|
||||
cd scripts
|
||||
python3 setup-generator.py
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#/bin/sh
|
||||
|
||||
systemctl stop nginx
|
||||
certbot certonly -n --standalone --agree-tos -d $1 -m $2
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
import glob
|
||||
import importlib
|
||||
import sys
|
||||
import subprocess
|
||||
import glob, importlib, sys
|
||||
|
||||
with open("setup-template.py", "r") as f:
|
||||
setup_template = f.read()
|
||||
|
|
@ -12,9 +9,6 @@ if len(sys.argv) >= 2:
|
|||
directories = sys.argv[1:]
|
||||
|
||||
for directory in directories:
|
||||
if ".." in directory:
|
||||
raise OSError("Illegal directory path")
|
||||
|
||||
if not glob.glob(f"{directory}/manifest.dat"):
|
||||
continue
|
||||
|
||||
|
|
@ -32,13 +26,10 @@ for directory in directories:
|
|||
|
||||
if replacement[0] == "#service":
|
||||
with open(f"{directory}/relaunch-docker.sh", "w") as f:
|
||||
f.write("#!/bin/sh\n")
|
||||
f.write("cd \"${0%/*}\"\n")
|
||||
f.write(f"docker pull $(docker inspect {replacement[1].strip()} | jq -r '.[0].Config.Image')\n")
|
||||
f.write(f"docker stop {replacement[1].strip()}\n")
|
||||
f.write(f"docker rm {replacement[1].strip()}\n")
|
||||
f.write(f"docker pull $(docker inspect {replacement[1]} | jq -r '.[0].Config.Image')\n")
|
||||
f.write(f"docker stop {replacement[1]}\n")
|
||||
f.write(f"docker rm {replacement[1]}\n")
|
||||
f.write(f"sh launch-docker.sh\n")
|
||||
subprocess.run(["chmod", "+x", f"{directory}/relaunch-docker.sh"])
|
||||
|
||||
if glob.glob(f"{directory}/parser.py"):
|
||||
should_continue = input(f"Custom instructions found in {directory}, continue? (Y/N) ")
|
||||
|
|
|
|||
Loading…
Reference in New Issue