Cleanup slideshow to match 20200828-4 release of pf-ui
This commit is contained in:
parent
d260b81ed4
commit
a92d742d86
|
@ -18,13 +18,21 @@ wget $DL_URL -O /usr/local/bin/pf-ui
|
|||
chmod a+x /usr/local/bin/pf-ui
|
||||
|
||||
# Setup systemd service for UI
|
||||
mkdir /etc/systemd/system/getty@tty1.service.d/
|
||||
cat > /etc/systemd/system/getty@tty1.service.d/override.conf <<EOF
|
||||
cat > /etc/systemd/system/pf-ui.service <<EOF
|
||||
[Unit]
|
||||
Description=PiFrame UI
|
||||
After=getty.target
|
||||
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/usr/local/bin/pf-ui
|
||||
User=root
|
||||
ExecStart=/usr/local/bin/pf-ui
|
||||
Restart=always
|
||||
TTYPath=/dev/tty1
|
||||
StandardInput=tty
|
||||
StandardOutput=tty
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
# Add fim user and setup fim
|
||||
|
@ -47,38 +55,28 @@ _display_status=0;
|
|||
_display_status_bar=0;
|
||||
_display_status_fmt=0;
|
||||
EOF
|
||||
|
||||
# Setup slideshow script stuff
|
||||
cat > /etc/default/fim_albums <<EOF
|
||||
/tank/pictures
|
||||
EOF
|
||||
cat > /usr/local/bin/pf-fim.sh <<EOF
|
||||
#!/bin/bash
|
||||
chvt 1
|
||||
tput civis
|
||||
exec </dev/tty1 >/dev/tty1 2>/dev/tty1
|
||||
/usr/bin/chvt 1
|
||||
/usr/bin/tput -T screen civis > /dev/tty1
|
||||
#exec </dev/tty1 >/dev/tty1 2>/dev/tty1
|
||||
#echo 2 > /sys/class/graphics/fbcon/rotate_all
|
||||
ALBUM_PATH=\`cat /etc/default/fim_albums\`
|
||||
/usr/bin/fim --verbose --no-commandline --no-history --etc-fimrc /usr/local/etc/fimrc \
|
||||
--device /dev/fb0 --vt 1 \
|
||||
--execute-commands-early "clear" --final-commands "clear" \
|
||||
--execute-commands 'while(1){display;sleep "300";next;}' \
|
||||
--autozoom --random \
|
||||
--cd-and-readdir --recursive \
|
||||
"\$ALBUM_PATH"
|
||||
EOF
|
||||
chmod a+x /usr/local/bin/pf-fim.sh
|
||||
cat > /etc/systemd/system/pf-ui.service <<EOF
|
||||
[Unit]
|
||||
Description=PiFrame UI
|
||||
After=getty.target
|
||||
|
||||
[Service]
|
||||
User=fim
|
||||
ExecStart=/usr/local/bin/pf-ui
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
# Setup console config stuff
|
||||
cat > /usr/local/bin/no-cursor-tty1.sh <<EOF
|
||||
#!/bin/bash
|
||||
/usr/bin/tput -T screen civis > /dev/tty1
|
||||
|
@ -97,6 +95,7 @@ ExecStart=/usr/local/bin/no-cursor-tty1.sh
|
|||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
# Setup watcher for filesystem events
|
||||
DL_URL=$(curl https://git.kemonine.info/api/v1/repos/PiFrame/piframe-go/releases | jq -r '.[0].assets[] | select(.name == "inotify") | .browser_download_url')
|
||||
wget $DL_URL -O /usr/local/bin/pf-inotify
|
||||
chmod a+x /usr/local/bin/pf-inotify
|
||||
|
@ -118,8 +117,9 @@ EOF
|
|||
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now no-cursor-tty1
|
||||
systemctl enable getty@tty1.service
|
||||
systemctl restart getty@tty1.service
|
||||
systemctl disable getty@tty1.service
|
||||
systemctl stop getty@tty1.service
|
||||
systemctl enable --now pf-ui
|
||||
systemctl enable --now inotify-pictures
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue