fixed directory definitions and added fix_dhcp script
This commit is contained in:
parent
2822cb946e
commit
83ec431641
4 changed files with 19 additions and 4 deletions
|
@ -8,7 +8,7 @@ root_disk=10
|
|||
variant="archlinux"
|
||||
path="default"
|
||||
dhcp_opts=""
|
||||
ssh_key_dir="../identity_files"
|
||||
ssh_key_dir="../../identity_files"
|
||||
mac=52:54:00:`openssl rand -hex 1`:`openssl rand -hex 1`:`openssl rand -hex 1`
|
||||
branch="prod"
|
||||
|
||||
|
|
15
scripts/fix_dhcp.sh
Normal file
15
scripts/fix_dhcp.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
cd "$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
ssh_key_dir="../../identity_files/"
|
||||
dhcp_dir="../../dhcp_files"
|
||||
|
||||
# build dhcp
|
||||
./shared_scripts/build_dhcp.sh > /tmp/dhcp
|
||||
|
||||
# copy dhcp file to router
|
||||
scp -i $ssh_key_dir/id_router -O /tmp/dhcp r.actcur.com:/etc/config/dhcp
|
||||
# remove active leases for ip
|
||||
ssh -i $ssh_key_dir/id_router r.actcur.com "sed -i '/$ip/d' /tmp/dhcp.leases"
|
||||
# restart dnsmasq
|
||||
ssh -i $ssh_key_dir/id_router r.actcur.com 'service dnsmasq restart'
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
cd "$(dirname "$(readlink -f "$0")")"
|
||||
dhcp_dir="../../dhcp_files"
|
||||
dhcp_dir="../../../dhcp_files"
|
||||
|
||||
# use files to build dhcp config file
|
||||
cat $dhcp_dir/base
|
||||
|
|
|
@ -4,8 +4,8 @@ mac=52:54:00:`openssl rand -hex 1`:`openssl rand -hex 1`:`openssl rand -hex 1`
|
|||
subnet="172.16.99"
|
||||
ip=generate
|
||||
|
||||
ssh_key_dir="../../identity_files/"
|
||||
dhcp_dir="../../dhcp_files"
|
||||
ssh_key_dir="../../../identity_files/"
|
||||
dhcp_dir="../../../dhcp_files"
|
||||
|
||||
usage="$(basename "$0") [options] server_name
|
||||
where:
|
||||
|
|
Loading…
Add table
Reference in a new issue