Skip to content

Commit

Permalink
Merge pull request #2 from miguelangel-nubla/refactor-scripts
Browse files Browse the repository at this point in the history
Refactor scripts
  • Loading branch information
miguelangel-nubla authored Mar 7, 2023
2 parents aa8bf37 + 6cec6f9 commit ca00515
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions step-ca-client/apparmor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ profile step-ca-client flags=(attach_disconnected,mediate_deleted) {
/proc/*/cpuset r,

# Access to the helper scripts
/usr/bin/create_with_token.sh ix,
/usr/bin/reload_certificates.sh ix,
/usr/bin/create-with-token.sh ix,
/usr/bin/reload-certificates.sh ix,
/usr/bin/renewal-daemon.sh ix,
/usr/bin/root_ca.sh ix,
/usr/bin/root-ca.sh ix,

# Access network
/sys/devices/virtual/dmi/id/product_uuid r,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ sleep 2 # give time to logging to flush and not be mixed


bashio::log.info "Starting step-ca-client"
/usr/bin/root_ca.sh
/usr/bin/root-ca.sh

if ! $(step certificate verify "/ssl/$(bashio::config 'certfile')" -roots=/root/.step/certs/root_ca.crt); then
/usr/bin/create_with_token.sh
/usr/bin/create-with-token.sh
fi

bashio::log.info "Starting renewal daemon..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ step ca certificate --kty=RSA -f \
--token="$(bashio::config 'token')" \
"$(bashio::config 'subjects' | head -1)" "/ssl/$(bashio::config 'certfile')" "/ssl/$(bashio::config 'keyfile')"

/usr/bin/reload_certificates.sh
/usr/bin/reload-certificates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
set -e

step ca renew --daemon -f \
--exec="/usr/bin/reload_certificates.sh" \
--exec="/usr/bin/reload-certificates.sh" \
"/ssl/$(bashio::config 'certfile')" "/ssl/$(bashio::config 'keyfile')"
File renamed without changes.

0 comments on commit ca00515

Please sign in to comment.