forked from ZEDOSPROJECT/ZED-UI-WEB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboot.sh
executable file
·58 lines (53 loc) · 1.25 KB
/
boot.sh
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
isLive=$(which ubiquity)
if [ -z $isLive ]; then
# is installed
cd Backend
./startBackend.sh&
cd ..
if [ -e ".branch" ]
then
if ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then
git checkout "$(<.branch)"
rm .branch
fi
fi
if ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then
cd updateInstaller
npm start&
cd ..
git stash
if ! git pull
then
git update-index --assume-unchanged Backend/SERVER/API/SYSTEM/SETTINGS/USER/SETTINGS.json
git pull
fi
cd Backend/SERVER/API/SYSTEM/SETTINGS/USER/
php updateSettings.php
cd ../../../../../../
./updateInstaller/postUpdate.sh
git stash pop
killall electron
fi
Xaxis=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1)
Yaxis=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2)
wget https://picsum.photos/${Xaxis}/${Yaxis} -q -O ./Backend/SERVER/Wallpapers/Images/onlineImage.jpg
cd Frontend
npm install
npm run electron&
sleep 1
npm start&
cd Backend
cd SERVER
cd API
cd APPS
php updateApps.php
sleep 10m
while [ true ]
do
php updateApps.php
sleep 30m
done
else
ubiquity
fi