cleaning up

This commit is contained in:
Kristjan Komlosi
2020-07-13 13:11:10 +02:00
parent 3d3254c4a7
commit 54b93cb05c
7 changed files with 0 additions and 64 deletions
-4
View File
@@ -1,4 +0,0 @@
#!/bin/bash
# run.sh - run the backend server
cd `dirname $0`
sudo gunicorn app:app -b 0.0.0.0:5000 &
-3
View File
@@ -1,3 +0,0 @@
interface=wlan0
dhcp-range=192.168.1.10,192.168.1.100,255.255.255.0,24h
address=/terahz.site/192.168.1.1
-6
View File
@@ -1,6 +0,0 @@
#!/bin/bash
# edit_ssid.sh - edits hostapd.conf and sets a MAC address-based SSID
cd `dirname $0`
ssid=`ip link | awk '/wlan0/ {getline; print $2}' | awk -v FS=':' '{printf("TeraHz_%s%s%s\n", $4, $5, $6)}'`
sed "/ssid=.*/s/ssid=.*/ssid=$ssid/" hostapd.conf > newconf
mv newconf hostapd.conf
-9
View File
@@ -1,9 +0,0 @@
interface=wlan0
hw_mode=g
channel=8
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ssid=TeraHz
wpa_passphrase=terahertz
-23
View File
@@ -1,23 +0,0 @@
# install.sh - install TeraHz onto a Raspbian Lite instance
cd `dirname $0`
apt -y update
apt -y full-upgrade
apt install -y python3 python3-pip lighttpd dnsmasq hostapd libatlas-base-dev
pip3 install numpy pandas flask smbus2 pyserial gunicorn
cp -R hostapd/* /etc/hostapd/
chmod +rx /etc/hostapd/edit_ssid.sh
cp dnsmasq.conf /etc/
cp rc.local /etc/
chmod +rx /etc/rc.local
cp interfaces-terahz /etc/network/interfaces.d/
cp -R ../frontend/* /var/www/html/
mkdir -p /usr/local/lib/terahz
cp -R ../backend/* /usr/local/lib/terahz
systemctl unmask dnsmasq hostapd lighttpd
systemctl enable dnsmasq hostapd lighttpd
-3
View File
@@ -1,3 +0,0 @@
iface wlan0 inet static
address 192.168.1.1
netmask 255.255.255.0
-16
View File
@@ -1,16 +0,0 @@
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/etc/hostapd/edit_ssid.sh &
/usr/local/lib/terahz/run.sh &
sleep 3
service hostapd restart # restart hostapd to prevent a weird startup race condition