31 lines
707 B
Desktop File
31 lines
707 B
Desktop File
# /etc/systemd/system/fileshare.service
|
|
# Adjust User, WorkingDirectory and ExecStart paths to your install.
|
|
#
|
|
# sudo cp deploy/fileshare.service /etc/systemd/system/
|
|
# sudo systemctl daemon-reload
|
|
# sudo systemctl enable --now fileshare
|
|
# sudo journalctl -u fileshare -f
|
|
|
|
[Unit]
|
|
Description=One-Time File Share
|
|
After=network.target mysqld.service
|
|
Wants=mysqld.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=fileshare
|
|
Group=fileshare
|
|
WorkingDirectory=/opt/fileshare
|
|
EnvironmentFile=/opt/fileshare/.env
|
|
ExecStart=/usr/bin/node src/server.js
|
|
Restart=always
|
|
RestartSec=3
|
|
|
|
# Hardening
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=full
|
|
ReadWritePaths=/opt/fileshare/data
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|