Setup installation
This commit is contained in:
42
examples/systemd-services/ssd-detection.service
Normal file
42
examples/systemd-services/ssd-detection.service
Normal file
@@ -0,0 +1,42 @@
|
||||
[Unit]
|
||||
Description=USB-C SSD Detection Service
|
||||
Documentation=https://git.gitcover.de/KMU/usb-ssd
|
||||
After=local-fs.target
|
||||
Wants=systemd-udevd.service
|
||||
After=systemd-udevd.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
ExecStart=/usr/local/bin/ssd-detect.sh --monitor --interval 5
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
TimeoutStartSec=30
|
||||
TimeoutStopSec=10
|
||||
|
||||
# Logging
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=ssd-detection
|
||||
|
||||
# Security
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/var/log /var/run /mnt
|
||||
PrivateTmp=true
|
||||
PrivateDevices=false
|
||||
DevicePolicy=closed
|
||||
DeviceAllow=/dev/sd* rw
|
||||
DeviceAllow=/dev/disk/by-uuid/* rw
|
||||
|
||||
# Environment
|
||||
Environment=SSD_LOG_LEVEL=INFO
|
||||
Environment=SSD_USE_SYSLOG=true
|
||||
Environment=SSD_MONITOR_INTERVAL=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=ssd-detect.service
|
Reference in New Issue
Block a user