Skip to content

Commit e7a844f

Browse files
author
Sam Dodrill
committed
fix(*): all services ensure valid config file on reload
Closes #1099 Replaces #1626
1 parent 07dbfd2 commit e7a844f

7 files changed

Lines changed: 22 additions & 1 deletion

File tree

builder/bin/check

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
#
3+
# Check that the configuration for deis-builder is valid.
4+
#
5+
6+
if grep -q "<no value>" $1 ; then
7+
exit 1
8+
fi

builder/conf.d/authorized_keys.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ mode = "0600"
77
keys = [
88
"/deis/builder/users",
99
]
10+
check_cmd = "/app/bin/check {{ .src }}"

builder/conf.d/builder.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ keys = [
99
"/deis/builder",
1010
"/deis/registry",
1111
]
12+
check_cmd = "/app/bin/check {{ .src }}"

builder/conf.d/check-repos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ keys = [
88
"/deis/services",
99
]
1010
reload_cmd = "/home/git/check-repos"
11+
check_cmd = "/app/bin/check {{ .src }}"

builder/conf.d/gitreceive.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ src = "gitreceive"
33
dest = "/usr/local/bin/gitreceive"
44
uid = 0
55
gid = 0
6-
mode = "0755"
6+
mode = "0755"
7+
check_cmd = "/app/bin/check {{ .src }}"

builder/conf.d/receiver.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ mode = "0755"
77
keys = [
88
"/deis/controller",
99
]
10+
check_cmd = "/app/bin/check {{ .src }}"

router/bin/check

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
#
3+
# Check that the configuration for deis-registry is valid.
4+
#
5+
6+
if grep -q "<no value>" $1 ; then
7+
exit 1
8+
fi

0 commit comments

Comments
 (0)