removed old utils virtualenv
This commit is contained in:
3
etcs/dnsmasq.conf
Normal file
3
etcs/dnsmasq.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
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
etcs/hostapd/edit_ssid.sh
Executable file
6
etcs/hostapd/edit_ssid.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/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
etcs/hostapd/hostapd.conf
Normal file
9
etcs/hostapd/hostapd.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
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
|
||||
18
etcs/install.sh
Executable file
18
etcs/install.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
# install.sh - install TeraHz onto a Raspbian or DietPi installation
|
||||
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
|
||||
chmod +rx /etc/hostapd/edit_ssid.sh
|
||||
cp dnsmasq.conf /etc
|
||||
cp rc.local /etc
|
||||
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
etcs/interfaces-terahz
Normal file
3
etcs/interfaces-terahz
Normal file
@@ -0,0 +1,3 @@
|
||||
iface wlan0 inet static
|
||||
address 192.168.1.1
|
||||
netmask 255.255.255.0
|
||||
27
etcs/lighttpd/lighttpd.conf
Normal file
27
etcs/lighttpd/lighttpd.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
server.modules = (
|
||||
"mod_access",
|
||||
"mod_alias",
|
||||
"mod_compress",
|
||||
"mod_redirect"
|
||||
)
|
||||
|
||||
server.document-root = "/var/www/html"
|
||||
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
|
||||
server.errorlog = "/var/log/lighttpd/error.log"
|
||||
server.pid-file = "/var/run/lighttpd.pid"
|
||||
server.username = "www-data"
|
||||
server.groupname = "www-data"
|
||||
server.port = 80
|
||||
|
||||
|
||||
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
|
||||
url.access-deny = ( "~", ".inc" )
|
||||
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
|
||||
|
||||
compress.cache-dir = "/var/cache/lighttpd/compress/"
|
||||
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
|
||||
|
||||
# default listening port for IPv6 falls back to the IPv4 port
|
||||
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
|
||||
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
||||
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
|
||||
16
etcs/rc.local
Normal file
16
etcs/rc.local
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user