
- Add MIT LICENSE file - Make README more generic and comprehensive - Add installation and troubleshooting sections - Include systemd service integration docs - Update with build and deployment instructions
2.8 KiB
2.8 KiB
Deployment Instructions
Prerequisites
Before deploying, ensure:
-
SSH Key Setup: You have passwordless SSH access to the server:
ssh -p 8443 rockvilleav@remote.rockvilletollandsda.church
-
Mac SSH Setup: The server can SSH to your Mac on port 8443:
# Test from the server: ssh -p 8443 benjaminslingo@macbook-pro.slingoapps.dev
-
Directory on Mac: Create the destination directory:
mkdir -p ~/rtsda/livestreams
Deployment
Simply run the deployment script:
./deploy.sh
This will:
- Build the release binary
- Package all necessary files
- Copy to the server
- Install as a systemd service
- Start the service
- Show service status
Manual Deployment (if script fails)
-
Build locally:
cargo build --release
-
Copy files to server:
scp -P 8443 target/release/livestream_archiver rockvilleav@remote.rockvilletollandsda.church:/tmp/ scp -P 8443 livestream-archiver.service rockvilleav@remote.rockvilletollandsda.church:/tmp/
-
Install on server:
ssh -p 8443 rockvilleav@remote.rockvilletollandsda.church # Create directories sudo mkdir -p /home/rockvilleav/livestream-archiver sudo mkdir -p /home/rockvilleav/Sync/Livestreams sudo mkdir -p /media/archive/jellyfin/livestreams # Move binary sudo mv /tmp/livestream_archiver /home/rockvilleav/livestream-archiver/ sudo chmod +x /home/rockvilleav/livestream-archiver/livestream_archiver # Install service sudo mv /tmp/livestream-archiver.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable livestream-archiver sudo systemctl start livestream-archiver # Set permissions sudo chown -R rockvilleav:rockvilleav /home/rockvilleav/livestream-archiver sudo chown -R rockvilleav:rockvilleav /home/rockvilleav/Sync/Livestreams
Management Commands
# Check status
sudo systemctl status livestream-archiver
# View logs
sudo journalctl -u livestream-archiver -f
# Restart service
sudo systemctl restart livestream-archiver
# Stop service
sudo systemctl stop livestream-archiver
Testing
- Place a test file in
/home/rockvilleav/Sync/Livestreams/
(name it like2024-07-21_10-30-00.mp4
) - Check logs to see if it detects and processes the file
- Verify sync to your Mac at
~/rtsda/livestreams/
- Check Jellyfin output at
/media/archive/jellyfin/livestreams/
Troubleshooting
- SSH connection issues: Verify port 8443 is open and SSH keys are set up
- Permission errors: Ensure directories have correct ownership (
rockvilleav:rockvilleav
) - rsync failures: Check network connectivity and SSH key authentication
- Service won't start: Check logs with
journalctl -u livestream-archiver