4 changed files with 67 additions and 0 deletions
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
version: '3' |
||||
|
||||
services: |
||||
wifi: |
||||
#user: root |
||||
image: cyber5k/wifi |
||||
container_name: mistborn_production_wifi |
||||
#labels: |
||||
# - "traefik.enable=true" |
||||
# - "traefik.port=80" |
||||
#env_file: |
||||
# - ../.envs/.production/.pihole |
||||
#command: /start |
||||
volumes: |
||||
- ../../mistborn_volumes/extra/wifi/wificfg.json:/cfg/wificfg.json |
||||
network_mode: host |
||||
privileged: true |
||||
|
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
{ |
||||
"dnsmasq_cfg": { |
||||
"address": "/#/192.168.27.1", |
||||
"dhcp_range": "192.168.27.100,192.168.27.150,1h", |
||||
"vendor_class": "set:device,IoT" |
||||
}, |
||||
"host_apd_cfg": { |
||||
"ip": "192.168.27.1", |
||||
"ssid": "iot-wifi-cfg-3", |
||||
"wpa_passphrase":"iotwifipass", |
||||
"channel": "6" |
||||
}, |
||||
"wpa_supplicant_cfg": { |
||||
"cfg_file": "/etc/wpa_supplicant/wpa_supplicant.conf" |
||||
} |
||||
} |
||||
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
[Unit] |
||||
Description=Mistborn Wifi Service |
||||
Requires=Mistborn-base.service |
||||
After=Mistborn-base.service |
||||
|
||||
[Service] |
||||
Restart=always |
||||
User=root |
||||
Group=docker |
||||
PermissionsStartOnly=true |
||||
# Shutdown container (if running) when unit is stopped |
||||
ExecStartPre=/usr/local/bin/docker-compose -f /opt/mistborn/extra/wifi.yml down |
||||
|
||||
ExecStartPre=/usr/local/bin/docker-compose -f /opt/mistborn/extra/wifi.yml build |
||||
# Start container when unit is started |
||||
ExecStart=/usr/local/bin/docker-compose -f /opt/mistborn/extra/wifi.yml up |
||||
# Stop container when unit is stopped |
||||
ExecStop=/usr/local/bin/docker-compose -f /opt/mistborn/extra/wifi.yml down |
||||
# Post stop |
||||
|
||||
[Install] |
||||
WantedBy=multi-user.target |
||||
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash |
||||
|
||||
# wpa_supplicant |
||||
sudo systemctl stop wpa_supplicant.service |
||||
sudo systemctl disable wpa_supplicant.service |
||||
sudo systemctl mask wpa_supplicant.service |
||||
sudo pkill wpa_supplicant |
||||
|
||||
# create wificfg.json |
||||
sudo mkdir -p /opt/mistborn_volumes/extra/wifi |
||||
sudo cp /opt/mistborn/scripts/conf/wificfg.json /opt/mistborn_volumes/extra/wifi/ |
||||
Loading…
Reference in new issue