ADD install script, service file and samba config

install-script
Filip Borum Poulsen 2 years ago
parent d3fccf2c5e
commit 35f079b271

@ -0,0 +1,26 @@
#!/bin/bash
cd /home/pi
# Install the required packages
sudo apt update -y
sudo apt install -y git curl wget nodejs npm samba samba-common-bin
git clone https://git.bpfilip.dk/fbp/video-player.git
cd video-player
npm install
# Create the samba share
sudo mkdir -p /video
sudo chown -R pi:pi /video
sudo chmod -R 777 /video
cat smb.conf | sudo tee -a /etc/samba/smb.conf
sudo systemctl restart smbd
sudo cp video-player.service /etc/systemd/system/video-player.service
sudo systemctl enable video-player.service
sudo systemctl start video-player.service

@ -0,0 +1,6 @@
[video]
path = /path/to/video/folder
writable = yes
guest ok = yes
create mask = 0777
directory mask = 0777

@ -0,0 +1,9 @@
[Unit]
Description=Video Player
After=multi-user.target
[Service]
ExecStart=node /home/pi/video-player/index.js
[Install]
WantedBy=multi-user.target
Loading…
Cancel
Save