Commit f1a0d681 authored by nanahira's avatar nanahira

base64

parent 0c1a5c9d
#!/bin/bash
INTERFACE=$1
COMMAND="flush interface ${INTERFACE}\nquit"
COMMAND_BASE64=$(echo "$COMMAND" | base64 -w 0)
cd ansible
ansible wg -m shell -a "echo -e \"flush interface ${INTERFACE}\\nquit\" | nc ::1 33123"
ansible wg -m shell -a "echo "$COMMAND_BASE64" | base64 --decode | nc ::1 33123"
ansible wg -m systemd -b -a "name=wg-quick@${INTERFACE} state=stopped enabled=false"
cd ..
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment