Skip to content

Commit

Permalink
1.2.8 add keepalived.conf, merge branch 'fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyale committed Feb 1, 2022
2 parents a9cdb49 + c0a1b5b commit a0132fd
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var (
// IsPrimary i.e. Is Primary Node
IsPrimary bool
// Version of JANUSEC
Version = "1.2.7"
Version = "1.2.8"
// NodeKey share with all nodes
NodeKey []byte
)
Expand Down
2 changes: 1 addition & 1 deletion release_batch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ printf "Creating installation package\n"
printf "Checklist:\n"
printf "* Angular Admin Version Check. \n"
printf "* Janusec Version Check. \n"
version="1.2.7"
version="1.2.8"
printf "Version: ${version} \n"

read -r -p "Are You Sure? [Y/n] " option
Expand Down
4 changes: 4 additions & 0 deletions scripts/check_pid.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
if [ -z "`pidof janusec`" ]; then
exit 1
fi
36 changes: 36 additions & 0 deletions scripts/keepalived.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
global_defs {
router_id janusec
script_user root
enable_script_security
}

vrrp_script check_pid {
script "/usr/local/janusec/check_pid.sh"
interval 5
}

vrrp_instance VI_01 {
state BACKUP
interface eth0
virtual_router_id 101

# priority may be modified
priority 100

nopreempt
advert_int 1

virtual_ipaddress {
# The virtual ip should be modified
192.168.100.111
}

track_script {
check_pid
}

authentication {
auth_type PASS
auth_pass janusec
}
}

0 comments on commit a0132fd

Please sign in to comment.