routeros: Move sw-backup script to role
This commit is contained in:
parent
fd6b5542d9
commit
7f7abc0ee7
3 changed files with 19 additions and 11 deletions
11
roles/routeros/files/sw-backup.sh
Executable file
11
roles/routeros/files/sw-backup.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
umask 022
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $(basename "$0") <hostname>" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ssh "admin@${1}" /export > "/srv/backup/${1}.rsc"
|
Loading…
Add table
Add a link
Reference in a new issue