Files
NomadBackup/nomad_backup/20251115_142246/qautomate.json
2025-11-21 13:07:40 -08:00

10 lines
1.3 KiB
JSON

{
"Format": "hcl2",
"JobID": "qautomate",
"JobModifyIndex": 13930001,
"Namespace": "default",
"Source": "job \"qautomate\" {\n periodic {\n cron = \"*/30 * * * *\"\n prohibit_overlap = true\n }\n datacenters = [\"dc1\"]\n\n type = \"batch\"\n\n group \"app\" {\n count = 1\n\n task \"setup\" {\n driver = \"docker\"\n\n lifecycle {\n hook = \"prestart\"\n }\n\n config {\n image = \"ghcr.io/sstent/ubuntu-python3\"\n // command = \"/bin/bash\"\n args = [\"-v\",\"-c\", \"/local/prestart.sh\"]\n\n }\n\n template {\n data = <<EOH\n#!/bin/bash\nrm /usr/lib/python3.11/EXTERNALLY-MANAGED\npip3 install qbittorrent-api --upgrade\npython3 /local/torrent_tagger.py\npython3 /local/torrent_tidy.py\n\n EOH\n perms = 0777\n destination = \"local/prestart.sh\"\n }\n\n template {\n change_mode = \"restart\"\n data = \"{{ key \\\"functions/torrent_tagger\\\" }}\"\n destination = \"local/torrent_tagger.py\"\n }\n\n template {\n change_mode = \"restart\"\n data = \"{{ key \\\"functions/torrent_tidy\\\" }}\"\n destination = \"local/torrent_tidy.py\"\n }\n\n\n }\n\n }\n\n\n\n}",
"VariableFlags": null,
"Variables": "",
"Version": 0
}