Initial Commit

This commit is contained in:
2018-04-06 17:22:19 +02:00
commit cd65d33e3e
57 changed files with 22103 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
# This file has five functions:
# 1) to completely disable starting dnsmasq,
# 2) to set DOMAIN_SUFFIX by running `dnsdomainname`
# 3) to select an alternative config file
# by setting DNSMASQ_OPTS to --conf-file=<file>
# 4) to tell dnsmasq to read the files in /etc/dnsmasq.d for
# more configuration variables.
# 5) to stop the resolvconf package from controlling dnsmasq's
# idea of which upstream nameservers to use.
# For upgraders from very old versions, all the shell variables set
# here in previous versions are still honored by the init script
# so if you just keep your old version of this file nothing will break.
#DOMAIN_SUFFIX=`dnsdomainname`
#DNSMASQ_OPTS="--conf-file=/etc/dnsmasq.alt"
# Whether or not to run the dnsmasq daemon; set to 0 to disable.
ENABLED=1
# By default search this drop directory for configuration options.
# Libvirt leaves a file here to make the system dnsmasq play nice.
# Comment out this line if you don't want this. The dpkg-* are file
# endings which cause dnsmasq to skip that file. This avoids pulling
# in backups made by dpkg.
CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new
# If the resolvconf package is installed, dnsmasq will use its output
# rather than the contents of /etc/resolv.conf to find upstream
# nameservers. Uncommenting this line inhibits this behaviour.
# Note that including a "resolv-file=<filename>" line in
# /etc/dnsmasq.conf is not enough to override resolvconf if it is
# installed: the line below must be uncommented.
#IGNORE_RESOLVCONF=yes
IGNORE_RESOLVCONF=yes
+21
View File
@@ -0,0 +1,21 @@
# Defaults for hostapd initscript
#
# See /usr/share/doc/hostapd/README.Debian for information about alternative
# methods of managing hostapd.
#
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
# file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
#
#DAEMON_CONF=""
DAEMON_CONF="/etc/hostapd/hostapd.conf"
# Additional daemon options to be appended to hostapd command:-
# -d show more debug messages (-dd for even more)
# -K include key data in debug messages
# -t include timestamps in some debug messages
#
# Note that -B (daemon mode) and -P (pidfile) options are automatically
# configured by the init.d script and must not be added to DAEMON_OPTS.
#
#DAEMON_OPTS=""
+10
View File
@@ -0,0 +1,10 @@
interface=wlan0
listen-address=192.168.255.1
dhcp-range=192.168.255.10,192.168.255.250,255.255.255.0,1h
dhcp-option=6,192.168.255.1
port=0
resolv-file=
no-resolv
no-poll
server=/hotspot.local/192.168.255.1
domain=local
+7
View File
@@ -0,0 +1,7 @@
; Configuration file generated by gammu-detect.
; Please check The Gammu Manual for more information.
[gammu]
device = /dev/ttyUSB2
name = Phone on USB serial port HUAWEI HUAWEI_Mobile
connection = at
+43
View File
@@ -0,0 +1,43 @@
# First we configure the interface we'll be listening on
interface=wlan0
# The interface to listen on
driver=nl80211
# The driver that is being used by the WiFi adapter, this could be different for everyone
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
# These 2 are just parameters so that the hostap daemon runs.
# Now onto the important WiFi configuration
ssid=ProxyPi
# First up, the SSID or Network name. This is what other devices will see when they try to connect.
hw_mode=g
# I'm setting this to Wireless G mode. A, B, and G are available here.
channel=7
# This is setting the channel that the WiFi is on, valid channels are from 1-11, or 1-14 depending on location.
# Wifi Security Settings
#wpa=2 # This sets the security settings to WPA2
#wpa_psk=928519398acf811e96f5dcac68a11d6aa876140599be3dd49612e760a2aaac0e
# The line above sets the wpa passphrase to "raspiwlan", this is obtained via the wpa_passphrase command.
# However, you can also set a passphrase like the line below.
#wpa_passphrase=raspiwlan
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_passphrase=heimetli33
#wpa_key_mgmt=WPA-PSK
#wpa_pairwise=CCMP
#rsn_pairwise=CCMP
# I've set these to WPA-PSK to indicate that we are using a Pre-Shared Key with CCMP encryption.
# Otherwise, hostapd also has a built in RADIUS server that we can use for authentcation
# But I'll leave that to another post.
# Other settings
beacon_int=100 # This sets how often the WiFi will send a beacon out.
auth_algs=1
wmm_enabled=0
# see https://raspberrypi.stackexchange.com/questions/11713/rtl8188cus-extremely-slow
#wme_enabled=1
#ieee80211n=1
#ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40]
+7
View File
@@ -0,0 +1,7 @@
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 proxypi
192.168.255.1 proxypi.local
@@ -0,0 +1,2 @@
iface gprs inet ppp
provider gprs
@@ -0,0 +1,5 @@
auto wlan0
iface wlan0 inet static
address 192.168.255.1
netmask 255.255.255.0
wireless-power off
+14
View File
@@ -0,0 +1,14 @@
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T gprs.swisscom.ch"
#connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T internet"
/dev/ttyUSB0
115200
noipdefault
usepeerdns
defaultroute
replacedefaultroute
persist
noauth
crtscts
local
debug
+24
View File
@@ -0,0 +1,24 @@
#!/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.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
# Disable HDMI to save power
# Joerg Lehmann, 2.4.2018
/usr/bin/tvservice -o
exit 0
@@ -0,0 +1,14 @@
[Unit]
Description=ProxyPi Web Server
After=syslog.target
After=network.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/home/pi/root-bin
ExecStart=/home/pi/root-bin/my_web_server.py
[Install]
WantedBy=multi-user.target
+32
View File
@@ -0,0 +1,32 @@
# Configuration for the usb_modeswitch package, a mode switching tool for
# USB devices providing multiple states or modes
#
# Evaluated by the wrapper script /usr/sbin/usb_modeswitch_dispatcher
#
# To enable an option, set it to "1", "yes" or "true" (case doesn't matter)
# Everything else counts as "disable"
# Disable automatic mode switching globally (e.g. to access the original
# install storage)
DisableSwitching=0
# Disable check for MBIM module presence and configuration globally (to aid
# special embedded environments)
#DisableMBIMGlobal=0
DisableMBIMGlobal=1
# Enable logging (results in a extensive report file in /var/log, named
# "usb_modeswitch_<interface-name>" and probably others
EnableLogging=0
# Optional increase of "delay_use" for the usb-storage driver; there are hints
# that a recent kernel default change to 1 sec. may lead to problems, particu-
# larly with USB 3.0 ports. Set this to at least 3 (seconds) in that case.
# Does nothing if the current system value is same or higher
#SetStorageDelay=4