
- Replace hardcoded paths with INPUT_DIR and OUTPUT_DIR env vars - Add sensible generic defaults if env vars not set - Update service example with all environment variables - Document environment variables in README - Makes codebase more portable and configuration-driven
18 lines
482 B
Plaintext
18 lines
482 B
Plaintext
[Unit]
|
|
Description=Livestream Archiver Service
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=<service-user>
|
|
Group=<service-group>
|
|
WorkingDirectory=/path/to/livestream-archiver
|
|
ExecStart=/path/to/livestream-archiver/target/release/livestream_archiver
|
|
Environment="PC_SYNC_TARGET=user@server:/path/to/destination/"
|
|
Environment="INPUT_DIR=/path/to/input/livestreams"
|
|
Environment="OUTPUT_DIR=/path/to/output/archive"
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |