integrating wifi container
This commit is contained in:
@@ -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 @@
|
||||
[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
|
||||
Executable
+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/
|
||||
Reference in New Issue
Block a user