home-server/roles/front/templates/DMZ.j2

11 lines
481 B
Django/Jinja

#!/bin/bash
# $1: bash script; $2…: arguments (bash -c "…script…" 'bash' …arguments…)
#
# The home-server project produces a multi-purpose setup using Ansible.
# Copyright © 2018 Y. Gablin, under the GPL-3.0-or-later license.
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
cmd="$1"; shift
nsenter -t $(machinectl status {{DMZ}} | awk '$1=="Leader:"{print $2;exit}') \
-a -F /usr/bin/bash -c "$cmd" bash "$@"