mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-17 18:08:16 +01:00
Add ssl
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
- Allow ssl using certificates generated by let's encrypt
|
||||
|
||||
## 0.13-24 (12-05-2024)
|
||||
- Enable cron jobs
|
||||
|
||||
|
||||
@@ -48,10 +48,13 @@ Options can be configured through three ways :
|
||||
- Addon options
|
||||
|
||||
```yaml
|
||||
TZ: Etc/UTC specify a timezone to use, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
|
||||
BIRDSONGS_FOLDER: folder to store birdsongs file # It should be an ssd if you want to avoid clogging of analysis
|
||||
BIRDS_ONLINE_INFO: uses either allaboutbird (US birds in english) or ebird (universal and translated) to provide online information
|
||||
pi_password: set the user password
|
||||
TZ: Etc/UTC specify a timezone to use, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
|
||||
ssl: true/false
|
||||
certfile: fullchain.pem #ssl certificate, must be located in /ssl
|
||||
keyfile: privkey.pem #sslkeyfile, must be located in /ssl
|
||||
pi_password: set the user password to access the web terminal
|
||||
localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. ex. sda1, sdb1, MYNAS...
|
||||
networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas
|
||||
cifsusername: "username" # optional, smb username, same for all smb shares
|
||||
|
||||
@@ -66,13 +66,17 @@
|
||||
"map": [
|
||||
"addon_config:rw",
|
||||
"media:rw",
|
||||
"share:rw"
|
||||
"share:rw",
|
||||
"ssl:rw"
|
||||
],
|
||||
"name": "BirdNET-pi",
|
||||
"options": {
|
||||
"BIRDSONGS_FOLDER": "/config/BirdSongs",
|
||||
"BIRDS_ONLINE_INFO": "ebird.org",
|
||||
"TZ": "Europe/Paris"
|
||||
"TZ": "Europe/Paris",
|
||||
"certfile": "fullchain.pem",
|
||||
"keyfile": "privkey.pem",
|
||||
"ssl": false
|
||||
},
|
||||
"panel_icon": "mdi:bird",
|
||||
"ports": {
|
||||
@@ -89,18 +93,21 @@
|
||||
"BIRDSONGS_FOLDER": "str?",
|
||||
"BIRDS_ONLINE_INFO": "list(allaboutbirds.org|ebird.org)",
|
||||
"TZ": "str?",
|
||||
"certfile": "str",
|
||||
"cifsdomain": "str?",
|
||||
"cifspassword": "str?",
|
||||
"cifsusername": "str?",
|
||||
"keyfile": "str",
|
||||
"localdisks": "str?",
|
||||
"networkdisks": "str?",
|
||||
"pi_password": "password"
|
||||
"pi_password": "password",
|
||||
"ssl": "bool"
|
||||
},
|
||||
"slug": "birdnet-pi",
|
||||
"tmpfs": true,
|
||||
"udev": true,
|
||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
|
||||
"usb": true,
|
||||
"version": "0.13-24",
|
||||
"version": "0.13-25",
|
||||
"video": true
|
||||
}
|
||||
|
||||
15
birdnet-pi/rootfs/etc/cont-init.d/31-ssl.sh
Normal file
15
birdnet-pi/rootfs/etc/cont-init.d/31-ssl.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
###############
|
||||
# SSL SETTING #
|
||||
###############
|
||||
|
||||
if bashio::config.true 'ssl'; then
|
||||
bashio::config.require.ssl
|
||||
certfile=$(bashio::config 'certfile')
|
||||
keyfile=$(bashio::config 'keyfile')
|
||||
sed -i "/root/a tls /ssl/${certfile}/ssl/${keyfile}" /etc/caddy/Caddyfile
|
||||
sed -i "s|http://|https://|g" /etc/caddy/Caddyfile
|
||||
fi
|
||||
Reference in New Issue
Block a user