mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 21:24:20 +01:00
Add addon smb_config
This commit is contained in:
10
README.md
10
README.md
@@ -8,11 +8,17 @@ Docker addons for HassIO
|
||||
|
||||
```
|
||||
addon_name:
|
||||
README.md
|
||||
Dockerfile
|
||||
config.json
|
||||
run.sh
|
||||
```
|
||||
|
||||
Use `FROM %%BASE_IMAGE%%` inside your docker file. We use alpine linux 3.5 for addons.
|
||||
Use `FROM %%BASE_IMAGE%%` inside your docker file. We use alpine linux 3.5 for addons. It need also a this line:
|
||||
|
||||
```docker
|
||||
ENV VERSION %%VERSION%%
|
||||
```
|
||||
|
||||
## Addon config
|
||||
|
||||
@@ -37,4 +43,4 @@ Use `FROM %%BASE_IMAGE%%` inside your docker file. We use alpine linux 3.5 for a
|
||||
```
|
||||
|
||||
## Addon need to known
|
||||
`/data` is a volume with a persistant store. `/data/options.json` have the user config inside. You can use `jq` inside shell script to parse this data.
|
||||
`/data` is a volume with a persistant store. `/data/options.json` have the user config inside. You can use `jq` inside shell script to parse this data. A other nice tool for write plugin is [Supervisor](http://supervisord.org/).
|
||||
|
||||
16
smb_config/Dockerfile
Normal file
16
smb_config/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM %%BASE_IMAGE%%
|
||||
|
||||
# Add version
|
||||
ENV VERSION %%VERSION%%
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
# Setup base
|
||||
RUN apk add --no-cache samba-server jq
|
||||
|
||||
# Copy data
|
||||
COPY run.sh /
|
||||
COPY smb.conf /etc/
|
||||
|
||||
RUN chmod 775 /run.sh
|
||||
|
||||
CMD [ "/run.sh" ]
|
||||
19
smb_config/config.json
Normal file
19
smb_config/config.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "Samba Config",
|
||||
"verson": "0.1",
|
||||
"slug": "smb_config",
|
||||
"description": "Expose config with samba",
|
||||
"startup": "after",
|
||||
"boot": "auto",
|
||||
"ports": {
|
||||
"445/tcp": 445
|
||||
},
|
||||
"map_config": true,
|
||||
"map_ssl": false,
|
||||
"options": {
|
||||
"workgroup": "WORKGROUP",
|
||||
},
|
||||
"schema": {
|
||||
"workgroup": "str"
|
||||
},
|
||||
}
|
||||
4
smb_config/run.sh
Normal file
4
smb_config/run.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
smbd -F -S -s /etc/smb.conf
|
||||
14
smb_config/smb.conf
Normal file
14
smb_config/smb.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
[global]
|
||||
workgroup = WORKGROUP
|
||||
server string = Samba HomeAssistant config share
|
||||
|
||||
load printers = no
|
||||
disable spoolss = yes
|
||||
|
||||
[config]
|
||||
browseable = yes
|
||||
writeable = yes
|
||||
path = /config
|
||||
|
||||
public = yes
|
||||
guest ok = yes
|
||||
Reference in New Issue
Block a user