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,45 @@
[Unit]
Description=Automatic SSD Mounting Service
Documentation=https://git.gitcover.de/KMU/usb-ssd
After=ssd-detection.service
Requires=ssd-detection.service
BindsTo=ssd-detection.service
[Service]
Type=forking
User=root
Group=root
ExecStart=/usr/local/bin/ssd-mount-manager.sh mount --auto-mount
ExecStop=/usr/local/bin/ssd-safe-eject.sh --all
ExecReload=/usr/local/bin/ssd-mount-manager.sh remount
PIDFile=/var/run/ssd-automount.pid
Restart=on-failure
RestartSec=10
TimeoutStartSec=60
TimeoutStopSec=30
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=ssd-automount
# Security
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/log /var/run /mnt /media
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_AUTO_MOUNT=true
Environment=SSD_MOUNT_POINT=/mnt/ssd-storage
[Install]
WantedBy=multi-user.target
Also=ssd-detection.service