mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-06 23:55:56 +02: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)
|
## 0.13-24 (12-05-2024)
|
||||||
- Enable cron jobs
|
- Enable cron jobs
|
||||||
|
|
||||||
|
|||||||
@@ -48,10 +48,13 @@ Options can be configured through three ways :
|
|||||||
- Addon options
|
- Addon options
|
||||||
|
|
||||||
```yaml
|
```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
|
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
|
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...
|
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
|
networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas
|
||||||
cifsusername: "username" # optional, smb username, same for all smb shares
|
cifsusername: "username" # optional, smb username, same for all smb shares
|
||||||
|
|||||||
@@ -66,13 +66,17 @@
|
|||||||
"map": [
|
"map": [
|
||||||
"addon_config:rw",
|
"addon_config:rw",
|
||||||
"media:rw",
|
"media:rw",
|
||||||
"share:rw"
|
"share:rw",
|
||||||
|
"ssl:rw"
|
||||||
],
|
],
|
||||||
"name": "BirdNET-pi",
|
"name": "BirdNET-pi",
|
||||||
"options": {
|
"options": {
|
||||||
"BIRDSONGS_FOLDER": "/config/BirdSongs",
|
"BIRDSONGS_FOLDER": "/config/BirdSongs",
|
||||||
"BIRDS_ONLINE_INFO": "ebird.org",
|
"BIRDS_ONLINE_INFO": "ebird.org",
|
||||||
"TZ": "Europe/Paris"
|
"TZ": "Europe/Paris",
|
||||||
|
"certfile": "fullchain.pem",
|
||||||
|
"keyfile": "privkey.pem",
|
||||||
|
"ssl": false
|
||||||
},
|
},
|
||||||
"panel_icon": "mdi:bird",
|
"panel_icon": "mdi:bird",
|
||||||
"ports": {
|
"ports": {
|
||||||
@@ -89,18 +93,21 @@
|
|||||||
"BIRDSONGS_FOLDER": "str?",
|
"BIRDSONGS_FOLDER": "str?",
|
||||||
"BIRDS_ONLINE_INFO": "list(allaboutbirds.org|ebird.org)",
|
"BIRDS_ONLINE_INFO": "list(allaboutbirds.org|ebird.org)",
|
||||||
"TZ": "str?",
|
"TZ": "str?",
|
||||||
|
"certfile": "str",
|
||||||
"cifsdomain": "str?",
|
"cifsdomain": "str?",
|
||||||
"cifspassword": "str?",
|
"cifspassword": "str?",
|
||||||
"cifsusername": "str?",
|
"cifsusername": "str?",
|
||||||
|
"keyfile": "str",
|
||||||
"localdisks": "str?",
|
"localdisks": "str?",
|
||||||
"networkdisks": "str?",
|
"networkdisks": "str?",
|
||||||
"pi_password": "password"
|
"pi_password": "password",
|
||||||
|
"ssl": "bool"
|
||||||
},
|
},
|
||||||
"slug": "birdnet-pi",
|
"slug": "birdnet-pi",
|
||||||
"tmpfs": true,
|
"tmpfs": true,
|
||||||
"udev": true,
|
"udev": true,
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
|
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
|
||||||
"usb": true,
|
"usb": true,
|
||||||
"version": "0.13-24",
|
"version": "0.13-25",
|
||||||
"video": true
|
"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