-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·27 lines (19 loc) · 861 Bytes
/
setup.sh
File metadata and controls
executable file
·27 lines (19 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -e
sudo apt install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox python3-pip chromium-browser xdotool
pip3 install -r requirements.txt
sudo mkdir -p /var/www/
sudo cp -r app /var/www/
# Prepare bash_profile
if test -f ~/.bash_profile && grep -q 'MagicMirror' /home/pi/.bash_profile; then
echo 'I seems like ~/.bash_profile already contains the setup. Skipping configuration of bash_profile.'
else
echo -e '# MagicMirror\n[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor' >> /home/pi/.bash_profile
fi
# Configure openbox
if grep -q 'MagicMirror' '/etc/xdg/openbox/autostart'; then
echo 'I seems like openbox is already configured. Skipping configuration of openbox.'
else
cat 'openbox.autostart' | sudo tee -a '/etc/xdg/openbox/autostart' > /dev/null
fi
cp 'scripts/reload.sh' '/home/pi/.reload.sh'