File tree 3 files changed +14
-12
lines changed
3 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ binaries:
5
5
GOOS=linux go build -o renewer/step github.com/smallstep/cli/cmd/step
6
6
7
7
build : build-nginx build-ca build-renewer
8
-
9
8
build-nginx :
10
9
docker build -t nginx-test:latest nginx
11
10
build-ca :
21
20
22
21
inspect :
23
22
step certificate inspect https://localhost:4443 --insecure
23
+
24
+ .PHONY : all binaries up down inspect
25
+ .PHONY : build build-nginx build-ca build-renewer
Original file line number Diff line number Diff line change 1
1
# min hour day month weekday command
2
- * * * * * rm -f /var/local/ step/site-new.crt && step ca renew --out /var/local/step/site-new .crt /var/local/step/site.crt /var/local/step/site. key && mv /var/local/step/site-new.crt /var/local/step/site.crt
2
+ * * * * * step ca renew --force /var/local/step/site.crt /var/local/step/site.key
Original file line number Diff line number Diff line change 3
3
# Wait for CA
4
4
sleep 5
5
5
6
- if [ ! -f /var/local/step/root_ca.crt ]; then
7
- # Donwload the root certificate
8
- step ca root /var/local/step/root_ca.crt
9
- fi
6
+ # Clean old certificates
7
+ rm -f /var/local/step/root_ca.crt
8
+ rm -f /var/local/step/site.crt /var/local/step/site.key
10
9
11
- if [ ! -f /var/local/step/site.crt ]; then
12
- # Get token
13
- STEP_TOKEN=$( step ca token $COMMON_NAME )
14
- # Donwload the root certificate
15
- step ca certificate --token $STEP_TOKEN $COMMON_NAME /var/local/step/site.crt /var/local/step/site.key
16
- fi
10
+ # Donwload the root certificate
11
+ step ca root /var/local/step/root_ca.crt
12
+
13
+ # Get token
14
+ STEP_TOKEN=$( step ca token $COMMON_NAME )
15
+ # Donwload the root certificate
16
+ step ca certificate --token $STEP_TOKEN $COMMON_NAME /var/local/step/site.crt /var/local/step/site.key
17
17
18
18
exec " $@ "
You can’t perform that action at this time.
0 commit comments