Skip to content

Commit

Permalink
add simple, exemplary xinitrc, list of system packages, system service
Browse files Browse the repository at this point in the history
file
  • Loading branch information
ebirn committed Nov 20, 2016
1 parent 30c05c8 commit 26ae1ad
Show file tree
Hide file tree
Showing 5 changed files with 683 additions and 1 deletion.
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,47 @@
# dash-deploy
rapid dashbboard deployment on Raspberry Pi
rapid dashbboard deployment on Raspberry Pi

##get started

ssh login to raspberry and clone the repository
```
ssh -l pi raspberrypi.local
git clone https://github.com/ebirn/dash-deploy
```
Now form within the cloned directory `dash-deploy`

Install required software packages: mostly X server, fonts, browser
The list of packages was obtained by `dpkg --get-selections`
```
cat installed-packages.txt | sudo dpkg --set-selections
```
Maybe follow up with a package update and reboot the system for good measure (and new kernels)
```
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
sudo reboot
```

## prepare ~/.xinitrc
```
cp xinitrc ~/.xinitrc
```
set variable `DASHBOARD_URL` in `~/.xinitrc` to the website that yould be used as dashboard
i.e. your Grafana Dasboad Playlist, Kibana Dashboard, etc.

## configure system services
```
sudo cp dashboard.service /etc/systemd/system/dashboard.service
sudo systemctl daemon-reload
sudo systemctl enable dashboard.servce
sudo systemctl start dashboard.service
```
The raspberry Pi will start the graphical user interface in fullscreen
and load the dashboard website - also when rebooting the device

Enjoy the new insights :sunglasses:



22 changes: 22 additions & 0 deletions dashboard.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#! /bin/sh
# Sys V init script to launch dashboard
# /etc/init.d/dashboard
case "$1" in
start)
echo "Starting dashboard"
# run application you want to start
/bin/su pi -c xinit &
;;
stop)
echo "Stopping dashboard"
# kill application you want to stop
killall xinit
;;
*)
echo "Usage: /etc/init.d/dashboard {start|stop}"
exit 1
;;
esac

exit 0

15 changes: 15 additions & 0 deletions dashboard.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# systemd unit file for launching dashboard
[Unit]
Description=Dashboard Service, Browser kiosk
Requires=networking.service
After=networking.service

[Service]
TimeoutStartSec=60
ExecStart=/usr/bin/xinit
User=pi
SuccessExitStatus=1

[Install]
WantedBy=multi-user.target

Loading

0 comments on commit 26ae1ad

Please sign in to comment.