July 02, 2014

Rasplex - Restricting section access at certain times

In case anyone is interested, as this is rasplex and I want to keep the auto updates, I wrote a script that runs on a different box:

sshpass -p 'rasplex' ssh -v root@192.168.1.120 'sed -i -e s/OLDTOKEN/NEWTOKEN/g /storage/.plexht/userdata/guisettings.xml' 
sshpass -p 'rasplex' ssh -v root@192.168.1.120 'sed -i -e "s/Signed in (OLDUSERNAME)/Signed in (NEWUSERNAME)/g" /storage/.plexht/userdata/guisettings.xml'
sshpass -p 'rasplex' ssh -v root@192.168.1.120 'reboot'


I have enabled 'Require authentication on local networks" on the local media server. Would be nice to restart services instead of reboot, but will work on that later.

GPS on Pi

AdaFruit Ultimate GPS Module v3
Wiring:
GPS   RPi GIOP
VIN   5V
GND   GND
RX       TX
TX       RX
——-
nano /boot/cmdline.txt
# Remove these in cmdline.txt:
# `console=ttyAMA0,115200`
# and `kgdboc=ttyAMA0,115200`.
# Mine looks like this:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
—–
Comment out the line “T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100″ at the end of /etc/inittab
nano /etc/inittab
#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
—-
apt-get install gpsd gpsd-clients
gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
cgps