Updated installation files
This commit is contained in:
parent
184f8cfc53
commit
0370987126
4 changed files with 40 additions and 11 deletions
10
install
10
install
|
|
@ -17,11 +17,14 @@ sudo apt --yes update
|
|||
sudo apt --yes upgrade
|
||||
|
||||
echo "--- Installing packages via apt"
|
||||
# needed for the CosmicPi software
|
||||
sudo apt --yes install git python-pip htop
|
||||
# needed for create_ap
|
||||
sudo apt --yes install git util-linux procps hostapd iproute2 iw haveged dnsmasq
|
||||
|
||||
echo "--- Installing python packages via pip"
|
||||
sudo pip install pyserial configparser numpy matplotlib flask flask_googlemaps
|
||||
echo "we need some more stuff here"
|
||||
echo "we might need some more packages"
|
||||
|
||||
echo "--- Installing create_ap via git"
|
||||
git clone https://github.com/oblique/create_ap --depth 1
|
||||
|
|
@ -29,6 +32,8 @@ cd create_ap
|
|||
sudo make install
|
||||
cd ..
|
||||
sudo rm -rf create_ap
|
||||
# copy the config file
|
||||
sudo cp -f install_files/create_ap.conf /etc/create_ap.conf
|
||||
|
||||
|
||||
echo "--- Setting up systemd services"
|
||||
|
|
@ -36,6 +41,9 @@ sed -i -e "s+$TOREPLACE+$EXECPATH+g" install_files/CosmicPi-detector.service
|
|||
sed -i -e "s+$TOREPLACE+$EXECPATH+g" install_files/CosmicPi-UI.service
|
||||
sudo cp -f install_files/*.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable CosmicPi-detector.service
|
||||
sudo systemctl enable CosmicPi-UI.service
|
||||
sudo systemctl enable create_ap
|
||||
|
||||
echo "--- Finished setup!"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
[Unit]
|
||||
Description=Start an AP for the CosmicPi
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/create_ap wlan0 eth0 CosmicPi
|
||||
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -2,7 +2,9 @@
|
|||
Description=Software for the CosmicPi UI
|
||||
|
||||
[Service]
|
||||
ExecStart=FLASK_APP=web_ui.py /usr/bin/python -m flask run --host=0.0.0.0 --port=80
|
||||
# Flask Env Vars
|
||||
Environment=FLASK_APP=PATH_TO_EXECUTABLE/frontend/web_ui.py
|
||||
ExecStart=/usr/bin/python -m flask run --host=0.0.0.0 --port=80
|
||||
WorkingDirectory=PATH_TO_EXECUTABLE/frontend/
|
||||
Restart=on-failure
|
||||
|
||||
|
|
|
|||
28
install_files/create_ap.conf
Normal file
28
install_files/create_ap.conf
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
CHANNEL=default
|
||||
GATEWAY=10.0.0.1
|
||||
WPA_VERSION=2
|
||||
ETC_HOSTS=0
|
||||
DHCP_DNS=gateway
|
||||
NO_DNS=0
|
||||
NO_DNSMASQ=0
|
||||
HIDDEN=0
|
||||
MAC_FILTER=0
|
||||
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
|
||||
ISOLATE_CLIENTS=0
|
||||
SHARE_METHOD=nat
|
||||
IEEE80211N=0
|
||||
IEEE80211AC=0
|
||||
HT_CAPAB=[HT40+]
|
||||
VHT_CAPAB=
|
||||
DRIVER=nl80211
|
||||
NO_VIRT=0
|
||||
COUNTRY=
|
||||
FREQ_BAND=2.4
|
||||
NEW_MACADDR=
|
||||
DAEMONIZE=0
|
||||
NO_HAVEGED=0
|
||||
WIFI_IFACE=wlan0
|
||||
INTERNET_IFACE=eth0
|
||||
SSID=CosmicPi
|
||||
PASSPHRASE=
|
||||
USE_PSK=0
|
||||
Loading…
Reference in a new issue