Skip to content

Instantly share code, notes, and snippets.

@nickbalch
Last active August 8, 2017 09:42
Show Gist options
  • Save nickbalch/94ebad8e487df7c13402c5415e51f508 to your computer and use it in GitHub Desktop.
Save nickbalch/94ebad8e487df7c13402c5415e51f508 to your computer and use it in GitHub Desktop.
Prepare a new Pi ... config files
# create ramdisk for logfiles
tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0
# /etc/network/interfaces
# enable wifi to automatically reconnect (which is not done by default, for some reason
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
# filename /etc/rsyslog.d/remote.conf
# add IP address of remote syslog server
*.* @@192.168.0.38:514
for ohdir in "${OPENHAB_LOG_DIR}" "${OPENHAB_CONFIGURATIONS_DIR}"; do
[ -d "${ohdir}" ] || mkdir "${ohdir}"
setPermRecursive "${ohdir}"
done
# file /etc/supervisor/conf.d/xxx.conf
[program:gpio2]
directory = /home/pi/python
command=python /home/pi/python/gpio2.py
stdout_logfile = syslog
stderr_logfile = syslog
@nickbalch
Copy link
Author

need to add logrotate configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment