Skip to content

Commit

Permalink
Updated readme, installer and added splashscreen install
Browse files Browse the repository at this point in the history
  • Loading branch information
reinzor committed Nov 23, 2016
1 parent c15a884 commit 400a9d4
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ TODO: Add readme for GPIO setup (hardware)
- Python yaml library
- Python picamera library

When you are on raspbian, please run the `install_deps` script in the script folder:
When you are on raspbian, please run the `install_deps` script:

source scripts/install_deps
./install_deps

### 2. Clone this repository

Expand Down
3 changes: 3 additions & 0 deletions scripts/install_deps → install_deps
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
sudo apt install python-picamera python-pigpio python-yaml

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $DIR/splashscreen/install

echo ""
read -n1 -r -p "Now please activate the raspberyy pi camera! Any key to continue..." key
echo ""
Expand Down
40 changes: 40 additions & 0 deletions splashscreen/asplashscreen
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: asplashscreen
# Required-Start:
# Required-Stop:
# Should-Start:
# Default-Start: S
# Default-Stop:
# Short-Description: Show custom splashscreen
# Description: Show custom splashscreen
### END INIT INFO


do_start () {

/usr/bin/fbi -T 1 -noverbose -a /etc/splash.png
exit 0
}

case "$1" in
start|"")
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
# No-op
;;
status)
exit 0
;;
*)
echo "Usage: asplashscreen [start|stop]" >&2
exit 3
;;
esac

:
25 changes: 25 additions & 0 deletions splashscreen/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

echo "Disable big splash screen raspberry pi"
sudo bash -c "echo 'disable_splash=1' >> /boot/config.txt"

echo "Removing login shell on TTY1"
sudo systemctl disable getty@tty1

echo "Installing fbi for custom splash screen linux"
sudo apt install fbi

# Get script dir
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

echo "Copying custom splash screen"
sudo cp $DIR/splash.png /etc/

echo "Copying custom splash screen init.d service"
sudo cp $DIR/asplashscreen /etc/init.d/

echo "Set permissions"
sudo chmod a+x /etc/init.d/asplashscreen

echo "Install for init mode"
sudo insserv /etc/init.d/asplashscreen

0 comments on commit 400a9d4

Please sign in to comment.