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,38 @@
[Unit]
Description=SSD Mount Manager for %i
Documentation=https://git.gitcover.de/KMU/usb-ssd
After=local-fs.target
BindsTo=dev-%i.device
After=dev-%i.device
[Service]
Type=oneshot
RemainAfterExit=yes
User=root
Group=root
ExecStart=/usr/local/bin/ssd-mount-manager.sh mount --device /dev/%i
ExecStop=/usr/local/bin/ssd-safe-eject.sh --device /dev/%i
TimeoutStartSec=30
TimeoutStopSec=15
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=ssd-mount
# Security
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/log /var/run /mnt
PrivateTmp=true
PrivateDevices=false
DevicePolicy=closed
DeviceAllow=/dev/%i rw
# Environment
Environment=SSD_LOG_LEVEL=INFO
Environment=SSD_USE_SYSLOG=true
[Install]
WantedBy=multi-user.target