Setup installation

This commit is contained in:
2025-08-07 19:28:22 +02:00
parent e3f6363844
commit 17d74b261d
19 changed files with 6144 additions and 0 deletions

View 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