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

15 lines
423 B
Cheetah
Raw Normal View History

[Unit]
Description=rclone S3 user service ({{ .user.username }})
After=network-online.target
[Service]
Type=simple
User={{ .user.username }}
2023-12-09 04:42:09 -08:00
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