load config action
This commit is contained in:
parent
ad10ebe437
commit
17c18e2548
1 changed files with 19 additions and 0 deletions
19
load_config.sh
Executable file
19
load_config.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SSH_OPTS="-o StrictHostKeyChecking=no"
|
||||
|
||||
scp $SSH_OPTS $1 root@192.168.42.6:/tmp/config.txt
|
||||
ssh $SSH_OPTS root@192.168.42.6 'cli -c "edit; load override /tmp/config.txt; commit and-quit"'
|
||||
|
||||
echo "collecting logs"
|
||||
|
||||
dir="./logs/$(date +"%Y%m%d_%H%M%S")-load_config"
|
||||
|
||||
mkdir -p "$dir"
|
||||
|
||||
touch "$dir/load-config"
|
||||
|
||||
cp "$1" "$dir/config.txt"
|
||||
cp ./load_config.sh "$dir"
|
||||
|
||||
echo "finished"
|
||||
Loading…
Add table
Add a link
Reference in a new issue