Added support for setting local timezone, and updated README
This commit is contained in:
parent
6a4fc4dea7
commit
6a64f09ea5
14
README.md
14
README.md
@ -17,11 +17,13 @@ Everything is controlled using the follwing environment variables.
|
|||||||
* **TICKET** is the ticket you get from the master (if you are using Director
|
* **TICKET** is the ticket you get from the master (if you are using Director
|
||||||
you find it under the Agent tab of the host).
|
you find it under the Agent tab of the host).
|
||||||
* **ACCEPT_CONFIG** takes a ***y*** or ***n*** value for yes or no. The default is
|
* **ACCEPT_CONFIG** takes a ***y*** or ***n*** value for yes or no. The default is
|
||||||
***n***.
|
***n***
|
||||||
* **ACCEPT_COMMANDS** takes a ***y*** or ***n*** value for yes or no. The default is
|
* **ACCEPT_COMMANDS** takes a ***y*** or ***n*** value for yes or no. The default is
|
||||||
***n***.
|
***n***
|
||||||
* **DISABLE_CONFD** takes a ***y*** or ***n*** value for yes or no. The default is
|
* **DISABLE_CONFD** takes a ***y*** or ***n*** value for yes or no. The default is
|
||||||
***y***. This should be a sane default for most people.
|
***y***. This should be a sane default for most people.
|
||||||
|
* **LOCAL_TIMEZONE** sets the local timezone of the satellite. For example
|
||||||
|
*Europe/Stockholm* or *America/New_York*
|
||||||
|
|
||||||
## Example usage
|
## Example usage
|
||||||
```
|
```
|
||||||
@ -44,6 +46,7 @@ services:
|
|||||||
image: jackbenny/icinga-satellite
|
image: jackbenny/icinga-satellite
|
||||||
ports:
|
ports:
|
||||||
- 5665:5665
|
- 5665:5665
|
||||||
|
restart:always
|
||||||
environment:
|
environment:
|
||||||
- CN=icinga-sat02.local
|
- CN=icinga-sat02.local
|
||||||
- ZONE=icinga-sat02.local
|
- ZONE=icinga-sat02.local
|
||||||
@ -54,6 +57,7 @@ services:
|
|||||||
- ACCEPT_CONFIG=y
|
- ACCEPT_CONFIG=y
|
||||||
- ACCEPT_COMMANDS=y
|
- ACCEPT_COMMANDS=y
|
||||||
- DISABLE_CONFD=y
|
- DISABLE_CONFD=y
|
||||||
|
- LOCAL_TIMEZONE=Europe/Stockholm
|
||||||
```
|
```
|
||||||
|
|
||||||
## Images
|
## Images
|
||||||
@ -62,6 +66,6 @@ services:
|
|||||||
> instead, tagged *0.n*.
|
> instead, tagged *0.n*.
|
||||||
|
|
||||||
There are two available images for you to choose from. The default one (0.*n*) is based on
|
There are two available images for you to choose from. The default one (0.*n*) is based on
|
||||||
Debian 10, with Icinga2 from Icingas official repository. The other image (0.*n*-alpine) is
|
Ubuntu 18.04, with Icinga2 from Icingas official repository. The other image (0.*n*-alpine) is
|
||||||
based on Alpine 3.11, with Icinga2 from Alpines repository. The Alpine image is much smaller
|
based on Alpine 3.11, with Icinga2 from Alpines repository. From 0.1.1-alpine and up, the Alpine
|
||||||
in size.
|
image is built on the latest Alpine. The Alpine image is much smaller in size.
|
||||||
|
@ -37,6 +37,11 @@ else
|
|||||||
DISABLE_CONF=" "
|
DISABLE_CONF=" "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set the local timezone
|
||||||
|
if [ ! -z "$LOCAL_TIMEZONE" ]; then
|
||||||
|
ln -sf /usr/share/zoneinfo/"$LOCAL_TIMEZONE" /etc/localtime
|
||||||
|
fi
|
||||||
|
|
||||||
icinga2 pki new-cert --cn "$CN" \
|
icinga2 pki new-cert --cn "$CN" \
|
||||||
--key /var/lib/icinga2/certs/"${CN}".key \
|
--key /var/lib/icinga2/certs/"${CN}".key \
|
||||||
--cert /var/lib/icinga2/certs/"${CN}".crt
|
--cert /var/lib/icinga2/certs/"${CN}".crt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user