Update 'agent/agent.js'

fix
This commit is contained in:
verita84 2022-08-15 20:40:14 +00:00
parent 68d24b87d6
commit 676a1281f7

View File

@ -388,7 +388,7 @@ app.post('/run', (req, res) => {
});
function systemd(data) {
const systemd = ["[Unit]", "Description=Container", "After=podman.service", "[Service]", "Type=oneshot", "RemainAfterExit=yes", "Environment=\"NAME=", "ExecStartPre=/bin/sh -c \"/usr/bin/podman rm -f ${NAME}; exit 0;\"", "ExecStartPre=/bin/sh -c \"/usr/bin/podman build -t ${NAME} /docker/${NAME}; exit 0;\"", "podman run", "ExecStart=/bin/sh -c \"systemctl restart firewalld.service; exit 0;\"", "ExecStart=/bin/sh -c \"podman network reload -a; exit 0;\"", "ExecStop=/usr/bin/podman rm -f ${NAME}\"", "[Install]", "WantedBy=multi-user.target"];
const systemd = ["[Unit]", "Description=Container", "After=podman.service", "[Service]", "Type=oneshot", "RemainAfterExit=yes", "Environment=\"NAME=", "ExecStartPre=/bin/sh -c \"/usr/bin/podman rm -f ${NAME}; exit 0;\"", "ExecStartPre=/bin/sh -c \"/usr/bin/podman build -t ${NAME} /docker/${NAME}; exit 0;\"", "podman run", "ExecStart=/bin/sh -c \"systemctl restart firewalld.service; exit 0;\"", "ExecStart=/bin/sh -c \"podman network reload -a; exit 0;\"", "ExecStop=/usr/bin/podman rm -f ${NAME}", "[Install]", "WantedBy=multi-user.target"];
var container_name = data.split(' ');
var name = container_name[container_name.length - 1];