39 lines
776 B
Desktop File
39 lines
776 B
Desktop File
[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
|