Skip to content
master
Switch branches/tags
Code

Latest commit

There were some changes in the deployed script which were not available
in the git..
ac45409

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Jan 2, 2019
Jan 2, 2019

spaceapi.py

Modify our hackspace's door state with a Raspberry Pi and a ridiculously oversized switch. This script writes the spaceapi.json and Site.SiteNav files for the Space API and PmWiki. These files are mounted via sshfs.

Installation

Connect the switch to the pin 11 and a ground pin.

Make sure the root user is able to log in the remote machine by having the ~/.ssh folder prepared. Furthermore, modify the /etc/fstab file to use sshfs as documented here.

# Install required software
sudo apt install python-dateutil sshfs

# Clone this repository and cd into it
sudo cp spaceapi.py /usr/bin/
sudo cp spaceapi.service /etc/systemd/system/

sudo mkdir /etc/conf.d/
sudo cp spaceapi /etc/conf.d/
# Modify /etc/conf.d/spaceapi afterwards

sudo systemctl daemon-reload
sudo systemctl enable spaceapi.service
sudo systemctl start spaceapi.service

About

Modify our door state with a Raspberry Pi and a ridiculously oversized switch

Resources

Releases

No releases published

Packages

No packages published

Languages