Issues with End of Line Sequences in bash scripts.
This commit is contained in:
parent
32164277e3
commit
7cdd751600
36
kiosk.sh
36
kiosk.sh
@ -1,19 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This small script is started by the service tinycheck-kiosk
|
||||
# in order to launch TinyCheck frontend in kiosk mode.
|
||||
|
||||
xset s noblank
|
||||
xset s off
|
||||
xset -dpms
|
||||
|
||||
if grep 'hide_mouse: true' /usr/share/tinycheck/config.yaml; then
|
||||
unclutter -idle 0 &
|
||||
fi
|
||||
|
||||
if grep 'kiosk_mode: true' /usr/share/tinycheck/config.yaml; then
|
||||
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
|
||||
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences
|
||||
|
||||
/usr/bin/chromium-browser http://127.0.0.1 --start-fullscreen --kiosk --incognito --noerrdialogs --disable-translate --no-first-run --fast --fast-start --disable-infobars --disable-features=TranslateUI &
|
||||
#!/bin/bash
|
||||
|
||||
# This small script is started by the service tinycheck-kiosk
|
||||
# in order to launch TinyCheck frontend in kiosk mode.
|
||||
|
||||
xset s noblank
|
||||
xset s off
|
||||
xset -dpms
|
||||
|
||||
if grep 'hide_mouse: true' /usr/share/tinycheck/config.yaml; then
|
||||
unclutter -idle 0 &
|
||||
fi
|
||||
|
||||
if grep 'kiosk_mode: true' /usr/share/tinycheck/config.yaml; then
|
||||
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
|
||||
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences
|
||||
|
||||
/usr/bin/chromium-browser http://127.0.0.1 --start-fullscreen --kiosk --incognito --noerrdialogs --disable-translate --no-first-run --fast --fast-start --disable-infobars --disable-features=TranslateUI &
|
||||
fi
|
60
update.sh
60
update.sh
@ -1,31 +1,31 @@
|
||||
# Checking rights.
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "The update must be run as root. Type in 'sudo bash $0' to run it as root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Clone the current repo.
|
||||
echo "[+] Cloning the current repository to /tmp/"
|
||||
cd /tmp/ && git clone https://github.com/KasperskyLab/TinyCheck
|
||||
|
||||
# Deleteing the current folders.
|
||||
echo "[+] Deleting the current TinyCheck folders"
|
||||
rm -rf /usr/share/TinyCheck/app/
|
||||
rm -rf /usr/share/TinyCheck/server/
|
||||
rm -rf /usr/share/TinyCheck/analysis/
|
||||
|
||||
# Copying the folders.
|
||||
echo "[+] Copying the new version"
|
||||
cd /tmp/TinyCheck && cp -R app/ /usr/share/tinycheck/app/
|
||||
cd /tmp/TinyCheck && cp -R server/ /usr/share/tinycheck/server/
|
||||
cd /tmp/TinyCheck && cp -R analysis/ /usr/share/tinycheck/analysis/
|
||||
|
||||
# Installing possible new dependencies.
|
||||
echo "[+] Checking new Python dependencies"
|
||||
cd /tmp/TinyCheck && python3 -m pip install -r assets/requirements.txt
|
||||
|
||||
# Back to the VueJS projects and reinstalling all the stuff
|
||||
echo "[+] Building new interfaces..."
|
||||
cd /usr/share/TinyCheck/app/frontend/ && npm install && npm run build
|
||||
cd /usr/share/TinyCheck/app/backend/ && npm install && npm run build
|
||||
# Checking rights.
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "The update must be run as root. Type in 'sudo bash $0' to run it as root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Clone the current repo.
|
||||
echo "[+] Cloning the current repository to /tmp/"
|
||||
cd /tmp/ && git clone https://github.com/KasperskyLab/TinyCheck
|
||||
|
||||
# Deleteing the current folders.
|
||||
echo "[+] Deleting the current TinyCheck folders"
|
||||
rm -rf /usr/share/TinyCheck/app/
|
||||
rm -rf /usr/share/TinyCheck/server/
|
||||
rm -rf /usr/share/TinyCheck/analysis/
|
||||
|
||||
# Copying the folders.
|
||||
echo "[+] Copying the new version"
|
||||
cd /tmp/TinyCheck && cp -R app/ /usr/share/tinycheck/app/
|
||||
cd /tmp/TinyCheck && cp -R server/ /usr/share/tinycheck/server/
|
||||
cd /tmp/TinyCheck && cp -R analysis/ /usr/share/tinycheck/analysis/
|
||||
|
||||
# Installing possible new dependencies.
|
||||
echo "[+] Checking new Python dependencies"
|
||||
cd /tmp/TinyCheck && python3 -m pip install -r assets/requirements.txt
|
||||
|
||||
# Back to the VueJS projects and reinstalling all the stuff
|
||||
echo "[+] Building new interfaces..."
|
||||
cd /usr/share/TinyCheck/app/frontend/ && npm install && npm run build
|
||||
cd /usr/share/TinyCheck/app/backend/ && npm install && npm run build
|
||||
echo "[+] TinyCheck updated!"
|
Loading…
Reference in New Issue
Block a user