Compare commits
2 commits
caa30660dc
...
f00f95edd3
| Author | SHA1 | Date | |
|---|---|---|---|
| f00f95edd3 | |||
| 976506489c |
2 changed files with 93 additions and 3 deletions
12
README.md
12
README.md
|
|
@ -60,7 +60,7 @@ It is also heavily advisable that you log into your device using SSH, so you sho
|
|||
1. Uncompress Image and flash onto SD card – you might need "7zip", "balenaEtcher" and/or other tools
|
||||
1. Check the SD card, open "dietpi.txt" and change some options (full documentation [here](https://dietpi.com/docs/usage/#options-within-the-file)):
|
||||
- For WiFi, use `AUTO_SETUP_NET_WIFI_ENABLED=1` and `AUTO_SETUP_NET_WIFI_COUNTRY_CODE=DE`, and also check "dietpi-wifi.txt"
|
||||
- System options, e.g. `AUTO_SETUP_AUTOMATED=1`, `AUTO_SETUP_NET_HOSTNAME=ovdashboard`, `AUTO_SETUP_GLOBAL_PASSWORD=dietpi`, `AUTO_SETUP_LOCALE=de_DE.UTF-8`, `AUTO_SETUP_KEYBOARD_LAYOUT=de`, `AUTO_SETUP_TIMEZONE=Europe/Berlin`, `CONFIG_SERIAL_CONSOLE_ENABLE=0`
|
||||
- System options, e.g. `AUTO_SETUP_AUTOMATED=1`, `AUTO_SETUP_NET_HOSTNAME=OVDashboard`, `AUTO_SETUP_GLOBAL_PASSWORD=dietpi`, `AUTO_SETUP_LOCALE=de_DE.UTF-8`, `AUTO_SETUP_KEYBOARD_LAYOUT=de`, `AUTO_SETUP_TIMEZONE=Europe/Berlin`, `CONFIG_SERIAL_CONSOLE_ENABLE=0`
|
||||
1. Be sure to at least change the password (and remember it 🙂️), then put the SD card into your device and boot it. Let the first time setup finish, it will take a bit. It will let you know when it is done!
|
||||
1. Log into your device using SSH. By default, that's user name `root` and password `dietpi`
|
||||
|
||||
|
|
@ -76,14 +76,20 @@ This can all be done after logging into your prepared device:
|
|||
1. `sh install.sh`
|
||||
- If you feel adventurous and do not want to review the script, just run `sh <( curl --proto '=https' --tlsv1.2 -sSf 'https://code.yavook.de/OEKZident.de/ovdashboard/raw/branch/master/install/install.sh' )`
|
||||
|
||||
> There will be some prompts during installation.
|
||||
>
|
||||
> - DietPi might ask if you want to change your GPU split. Choose **Yes**.
|
||||
> - DietPi will ask if you want to configure autostart options. **Cancel** that, this choice does not matter as it is changed by the installer.
|
||||
> - The installer will ask for the connected display's resolution. The default values should be fine, you can likely just hit **Return** here.
|
||||
> - The installer will ask for "display languages". This determines internationalization on the kiosk (connected display). For German, enter `de-DE,de,en-US,en`.
|
||||
|
||||
Afterwards, reboot your device (`reboot` in the terminal). Your OVDashboard should be working now.
|
||||
|
||||
For a better understanding of your newly created OVDashboard, refer to the [about section](#about-the-default-ovdashboard-deployment).
|
||||
|
||||
## Updates, upgrades
|
||||
|
||||
<!-- TODO -->
|
||||
`/opt/ovdashboard`
|
||||
<!-- TODO `/opt/ovdashboard` -->
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
|
|||
84
install/install.sh
Normal file
84
install/install.sh
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
#!/bin/sh
|
||||
|
||||
#########
|
||||
# start #
|
||||
#########
|
||||
|
||||
# env setup
|
||||
ovd_version="0.1.0"
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
set -e
|
||||
|
||||
# banner
|
||||
echo "Installer for OVDashboard ${ovd_version}"
|
||||
echo "Waiting 10 seconds, press Ctrl+C to cancel installation ..."
|
||||
sleep 10
|
||||
|
||||
#################
|
||||
# prerequisites #
|
||||
#################
|
||||
|
||||
# 134: docker with compose
|
||||
# 113: chromium browser
|
||||
/boot/dietpi/dietpi-software install 134 113
|
||||
|
||||
# htpdate (timesync in restricted networks)
|
||||
# unclutter (hides mouse cursor)
|
||||
apt-get update && apt-get install --yes --no-install-recommends \
|
||||
htpdate unclutter
|
||||
|
||||
# activate unclutter
|
||||
echo '/usr/bin/unclutter -idle 0.1 &' > /etc/chromium.d/dietpi-unclutter
|
||||
|
||||
# chromium window size
|
||||
echo "Please enter your screen resolution!"
|
||||
|
||||
screen_x="$( cut -d ',' -f 1 '/sys/class/graphics/fb0/virtual_size' )"
|
||||
printf "Width [default: %d]: " "${screen_x}"
|
||||
read -r screen_x_in
|
||||
screen_x="${screen_x_in:-$screen_x}"
|
||||
sed -ri "s/^(SOFTWARE_CHROMIUM_RES_X=)[0-9]+$/\1${screen_x}/" '/boot/dietpi.txt'
|
||||
|
||||
screen_y="$( cut -d ',' -f 2 '/sys/class/graphics/fb0/virtual_size' )"
|
||||
printf "Height [default: %d]: " "${screen_y}"
|
||||
read -r screen_y_in
|
||||
screen_y="${screen_y_in:-$screen_y}"
|
||||
sed -ri "s/^(SOFTWARE_CHROMIUM_RES_Y=)[0-9]+$/\1${screen_y}/" '/boot/dietpi.txt'
|
||||
|
||||
# chromium autostart
|
||||
echo '11' > '/boot/dietpi/.dietpi-autostart_index' # magic number
|
||||
sed -ri "s/^(AUTO_SETUP_AUTOSTART_LOGIN_USER=).+$/\1dietpi/" '/boot/dietpi.txt' # run as "dietpi"
|
||||
sed -ri "s/^(SOFTWARE_CHROMIUM_AUTOSTART_URL=).+$/\1http:\/\/localhost\//" '/boot/dietpi.txt' # open "localhost"
|
||||
|
||||
# chromium language
|
||||
display_lang="en-US,en"
|
||||
printf "Enter display language(s) [default: %s]: " "${display_lang}"
|
||||
read -r display_lang_in
|
||||
display_lang="${display_lang_in:-${display_lang}}"
|
||||
|
||||
sudo -u dietpi mkdir -p '/home/dietpi/.config/chromium/Default'
|
||||
echo '{"intl":{"selected_languages":"'"${display_lang}"'"}}' \
|
||||
| sudo -u dietpi tee '/home/dietpi/.config/chromium/Default/Preferences' \
|
||||
> /dev/null
|
||||
|
||||
#######
|
||||
# app #
|
||||
#######
|
||||
|
||||
mkdir -p /opt/ovdashboard
|
||||
|
||||
# compose file
|
||||
curl \
|
||||
--proto "=https" --tlsv1.2 -sSf \
|
||||
--output "/opt/ovdashboard/docker-compose.yml" \
|
||||
"https://code.yavook.de/OEKZident.de/ovdashboard/raw/tag/v${ovd_version}/install/docker-compose.yml"
|
||||
echo "Please review the Docker Compose file before continuing! [press Enter]"
|
||||
read -r _ENTER
|
||||
nano "/opt/ovdashboard/docker-compose.yml"
|
||||
|
||||
# start server
|
||||
docker compose \
|
||||
--file "/opt/ovdashboard/docker-compose.yml" \
|
||||
--project-directory "/opt/ovdashboard" \
|
||||
--project-name "ovdashboard" \
|
||||
up --detach
|
||||
Loading…
Reference in a new issue