142 lines
3.9 KiB
Plaintext
142 lines
3.9 KiB
Plaintext
########################################
|
|
# syncthing / rclone / web based file browser
|
|
########################################
|
|
|
|
curl https://rclone.org/install.sh | bash
|
|
pacman -S syncthing
|
|
touch /tank/pictures/.stfolder
|
|
chown feh: /tank/pictures/.stfolder
|
|
systemctl enable --now syncthing@feh.service # use feh user so perms are right for pics
|
|
ssh -L 8385:127.0.0.1:8384 user@piframe
|
|
http://localhost:8385
|
|
Change settings
|
|
General
|
|
Minimum free disk space : 10%
|
|
Anonymous usage reporting : Disabled
|
|
GUI
|
|
Listen address : 0.0.0.0:8384
|
|
GUI Auth user : admin
|
|
GUI Auth password : apassword
|
|
Delete default folder
|
|
Add /tank/pictures folder
|
|
Connect to upstream device w/ files you want to sync
|
|
Setup picture sync as inbound only
|
|
firewall-cmd --zone=public --permanent --add-port=8384/tcp
|
|
firewall-cmd --zone=public --permanent --add-port=22000/tcp
|
|
firewall-cmd --reload
|
|
|
|
curl -fsSL https://filebrowser.org/get.sh | bash
|
|
mkdir /home/feh/filebrowser
|
|
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
|
|
config init
|
|
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
|
|
config set --address 0.0.0.0
|
|
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
|
|
config set --port 9191
|
|
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
|
|
config set --branding.name "PiFrame - Pictures"
|
|
filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db \
|
|
users add admin apassword
|
|
chown feh: -R /home/feh/filebrowser
|
|
firewall-cmd --zone=public --permanent --add-port=9191/tcp
|
|
firewall-cmd --reload
|
|
cat > /etc/systemd/system/filebrowser-pictures.service <<EOF
|
|
[Unit]
|
|
Description=Filebrowser - Pictures
|
|
After=network.target
|
|
|
|
[Service]
|
|
User=feh
|
|
PrivateTmp=true
|
|
ExecStart=/usr/local/bin/filebrowser -c /home/feh/filebrowser/pictures.json -d /home/feh/filebrowser/pictures.db -r /tank/pictures --img-processors 1 --disable-thumbnails
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
systemctl daemon-reload
|
|
systemctl enable --now filebrowser-pictures
|
|
|
|
########################################
|
|
# wifi setup
|
|
########################################
|
|
|
|
nmtui # final wifi config to keep wires to a minimum (COCKPIT SETUP REQUIRED)
|
|
# use wifi-menu if not using network manger (network manager is part of cockpit setup)
|
|
|
|
########################################
|
|
# hdmi on/off commands
|
|
########################################
|
|
|
|
vcgencmd get_lcd_info
|
|
vcgencmd display_power 0
|
|
vcgencmd display_power 1
|
|
|
|
########################################
|
|
# schedule on/off of monitor
|
|
########################################
|
|
|
|
cat > /etc/systemd/system/screen-on.timer <<EOF
|
|
[Unit]
|
|
Description=Turn on display
|
|
|
|
[Timer]
|
|
OnCalendar=*-*-* 6:00:00
|
|
Persistent=true
|
|
|
|
[Install]
|
|
WantedBy=timers.target
|
|
EOF
|
|
cat > /etc/systemd/system/screen-on.service <<EOF
|
|
[Unit]
|
|
Description=Turn on display
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/opt/vc/bin/vcgencmd display_power 1
|
|
StandardOutput=journal
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
cat > /etc/systemd/system/screen-off.timer <<EOF
|
|
[Unit]
|
|
Description=Turn off display
|
|
|
|
[Timer]
|
|
OnCalendar=*-*-* 00:00:00
|
|
Persistent=true
|
|
|
|
[Install]
|
|
WantedBy=timers.target
|
|
EOF
|
|
cat > /etc/systemd/system/screen-off.service <<EOF
|
|
[Unit]
|
|
Description=Turn off display
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/opt/vc/bin/vcgencmd display_power 0
|
|
StandardOutput=journal
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
systemctl daemon-reload
|
|
systemctl enable screen-on.timer
|
|
systemctl enable screen-off.timer
|
|
|
|
|
|
|
|
|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
! Misc Notes
|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=24679
|
|
|
|
eyyy, 2560x1600 @ 50hz via hdmi on a pi4 is working!
|
|
|
|
hdmi_cvt=2560 1600 50 5 0 0 1
|
|
hdmi_group=2
|
|
hdmi_mode=88
|