diff --git a/README.md b/README.md index 495352a..7c549e4 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,8 @@ services: UNIFI_PASSWORD: 'password' # The UniFi Site ID UNIFI_SITE_ID: 'default' + # The UniFi SSID where guests need to connect to (Used within templating and 'Scan to Connect') + UNIFI_SSID: '' # The password used to log in to the voucher portal Web UI AUTH_PASSWORD: '0000' # The Bearer token used for the API diff --git a/docker-compose.yml b/docker-compose.yml index 31c7d1f..eb3a1ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: UNIFI_USERNAME: 'admin' UNIFI_PASSWORD: 'password' UNIFI_SITE_ID: 'default' + UNIFI_SSID: '' AUTH_PASSWORD: '0000' AUTH_TOKEN: '00000000-0000-0000-0000-000000000000' AUTH_OIDC_ISSUER_BASE_URL: '' diff --git a/modules/info.js b/modules/info.js index efd3c08..76f2dce 100644 --- a/modules/info.js +++ b/modules/info.js @@ -87,5 +87,5 @@ module.exports = () => { /** * Log controller */ - log.info(`[UniFi] Using Controller on: ${variables.unifiIp}:${variables.unifiPort} (Site ID: ${variables.unifiSiteId})`); + log.info(`[UniFi] Using Controller on: ${variables.unifiIp}:${variables.unifiPort} (Site ID: ${variables.unifiSiteId}${variables.unifiSsid !== '' ? `, SSID: ${variables.unifiSsid}` : ''})`); }; diff --git a/modules/variables.js b/modules/variables.js index 578fd8b..849a781 100644 --- a/modules/variables.js +++ b/modules/variables.js @@ -12,6 +12,7 @@ module.exports = { unifiUsername: config('unifi_username') || process.env.UNIFI_USERNAME || 'admin', unifiPassword: config('unifi_password') || process.env.UNIFI_PASSWORD || 'password', unifiSiteId: config('unifi_site_id') || process.env.UNIFI_SITE_ID || 'default', + unifiSsid: config('unifi_ssid') || process.env.UNIFI_SSID || '', voucherTypes: config('voucher_types') || process.env.VOUCHER_TYPES || '480,1,,,;', voucherCustom: config('voucher_custom') !== null ? config('voucher_custom') : process.env.VOUCHER_CUSTOM ? process.env.VOUCHER_CUSTOM !== 'false' : true, serviceWeb: process.env.SERVICE_WEB ? process.env.SERVICE_WEB !== 'false' : true,