Skip to content

Commit

Permalink
Add TIMEZONE env to Asterisk container (#99)
Browse files Browse the repository at this point in the history
* Add TIMEZONE env to Asterisk container

* Add timezone to get-configuration
  • Loading branch information
Stell0 authored Dec 19, 2023
1 parent 32c95f6 commit f749f17
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions imageroot/actions/configure-module/20setenvs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ getFromRequest(request, 'nethcti_log_level', 'NETHCTI_LOG_LEVEL', 'warn')
getFromRequest(request, 'conference_jitsi_url', 'CONFERENCE_JITSI_URL', 'https://jitsi.nethserver.net')
getFromRequest(request, 'app_brand_id', 'BRAND_APPID', '')
getFromRequest(request, 'flexisip_log_level', 'FLEXISIP_LOG_LEVEL', 'warning')
getFromRequest(request, 'timezone', 'TIMEZONE', 'UTC')

## NethCTI UI
getFromRequest(request, 'nethcti_ui_host', 'NETHCTI_UI_HOST', '')
Expand Down
4 changes: 4 additions & 0 deletions imageroot/actions/configure-module/validate-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@
"reports_ui_company_name": {
"description": "Company name of the reports UI app.",
"type": "string"
},
"timezone": {
"description": "Asterisk Timezone for timeconditions",
"type": "string"
}
}
}
1 change: 1 addition & 0 deletions imageroot/actions/get-configuration/20read
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ config = {
'nethvoice_host': os.getenv('NETHVOICE_HOST', ''),
'nethcti_ui_host': os.getenv('NETHCTI_UI_HOST', ''),
'lets_encrypt': os.getenv('TRAEFIK_LETS_ENCRYPT') == 'True',
'timezone': os.getenv('TIMEZONE', 'UTC'),
'user_domain': os.getenv('USER_DOMAIN', ''),
'reports_international_prefix': os.getenv('REPORTS_INTERNATIONAL_PREFIX', '')
}
Expand Down
4 changes: 4 additions & 0 deletions imageroot/actions/get-configuration/validate-output.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"description": "Enable Let's Encrypt certificate",
"type": "boolean"
},
"timezone": {
"description": "Timezone for the Nethvoice instance",
"type": "string"
},
"user_domain": {
"description": "Domain where the user accessing Nethvoice are stored",
"type": "string"
Expand Down
1 change: 1 addition & 0 deletions imageroot/systemd/user/asterisk.service
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ExecStart=/usr/bin/podman run \
--env=NETHVOICE* \
--env=ASTERISK_* \
--network=host \
--tz=TIMEZONE \
${NETHVOICE_ASTERISK_IMAGE}

# Wait till asterisk is active
Expand Down

0 comments on commit f749f17

Please sign in to comment.