File tree Expand file tree Collapse file tree
src/modules/magicmirroros/filesystem/home/pi/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- if [ ! -f /home/pi/magicmirror/run/docker-compose.yml ]; then
4- cd /home/pi/
5- git clone https://gitlab.com/khassel/magicmirror.git
3+ _log=$HOME /scripts/start.log
4+ echo " ---------log-of-run_magicmirroros---------" > $_log
5+
6+ if [ ! -f $HOME /magicmirror/run/docker-compose.yml ]; then
7+ sudo update-ca-certificates & >> $_log
8+ _curl=1
9+ until [ $_curl -eq 0 ]
10+ do
11+ curl -f -L -s https://gitlab.com
12+ _curl=$?
13+ if [ ! $_curl -eq 0 ]; then
14+ echo " cannot connect to gitlab.com ..." & >> $_log
15+ sleep 5s
16+ fi
17+ done
18+ cd $HOME /
19+ rm -rf magicmirror
20+ git clone https://gitlab.com/khassel/magicmirror.git & >> $_log
621 cd magicmirror/run
7- cp rpi.yml docker-compose.yml
8- mkdir -p /home/pi /magicmirror/mounts
22+ cp -v rpi.yml docker-compose.yml & >> $_log
23+ mkdir -p $HOME /magicmirror/mounts
924fi
10- cd /home/pi /magicmirror/run
25+ cd $HOME /magicmirror/run
1126# start mm
12- docker-compose up -d
27+ docker-compose up -d & >> $_log
1328# pull newest docker image
14- docker-compose pull
29+ docker-compose pull & >> $_log
1530# restart if image changed
16- docker-compose up -d
31+ docker-compose up -d & >> $_log
32+ # delete old images
33+ docker image prune -f & >> $_log
34+ # disable wlan power save
35+ sudo iw wlan0 set power_save off
1736
1837sleep infinity
19- # xterm
20- # while true
21- # do
22- # sleep 10
23- # done
You can’t perform that action at this time.
0 commit comments