mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-18 20:47:58 +00:00
Enable usage of previously backed up settings when starting new ACA container (#871)
* Add container env variable to import settings * New script needs +x [no ci]
This commit is contained in:
parent
42d7c73fe1
commit
de17aee7de
@ -84,4 +84,4 @@ HEALTHCHECK --start-period=50s --interval=1s --timeout=90s CMD curl -f https://l
|
|||||||
WORKDIR /hirs
|
WORKDIR /hirs
|
||||||
|
|
||||||
# On container launch, the database will be set up. Then bootRun should utilize build artifacts stored in the image.
|
# On container launch, the database will be set up. Then bootRun should utilize build artifacts stored in the image.
|
||||||
CMD ["bash", "-c", "/hirs/package/linux/aca/aca_setup.sh --unattended && /tmp/hirs_add_aca_tls_path_to_os.sh && /hirs/package/linux/aca/aca_bootRun.sh"]
|
CMD ["bash", "-c", "/hirs/package/linux/aca/aca_check_env.sh && /hirs/package/linux/aca/aca_setup.sh --unattended && /tmp/hirs_add_aca_tls_path_to_os.sh && /hirs/package/linux/aca/aca_bootRun.sh"]
|
18
package/linux/aca/aca_check_env.sh
Executable file
18
package/linux/aca/aca_check_env.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Imported /etc/hirs should only be used if one doesn't exist
|
||||||
|
if [ ! -d "/etc/hirs" ]; then
|
||||||
|
if [ -n "${HIRS_USE_IMPORTED_ETC_HIRS}" ]; then
|
||||||
|
IMPORTED_ETC_HIRS_PATH="${HIRS_USE_IMPORTED_ETC_HIRS}"
|
||||||
|
|
||||||
|
if [ -d "$IMPORTED_ETC_HIRS_PATH" ]; then
|
||||||
|
cp -r "$IMPORTED_ETC_HIRS_PATH" /etc/hirs
|
||||||
|
|
||||||
|
find /etc/hirs -type d -exec chown root:root {} +
|
||||||
|
find /etc/hirs/certificates -type d -exec chown :mysql {} +
|
||||||
|
find /etc/hirs -type d -exec chmod -R g+rx {} +
|
||||||
|
find /etc/hirs -type f -exec chmod -R 644 {} +
|
||||||
|
chmod 755 /etc/hirs
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user