install.fairie/home/dot_config/rclone/s3-user.service.tmpl

15 lines
419 B
Cheetah
Raw Normal View History

[Unit]
Description=rclone S3 user service ({{ .user.username }})
After=network-online.target
[Service]
Type=simple
User={{ .user.username }}
ExecStartPre=/usr/bin/mkdir -p /home/{{ .user.username }}/.local/mnt/s3
ExecStart=/usr/local/bin/rclone-mount "user" "{{ .user.username }}" "s3"
ExecStop=/bin/fusermount -u /home/{{ .user.username }}/.local/mnt/s3
Restart=always
RestartSec=10
[Install]
WantedBy=default.target