Rclone: Difference between revisions

Line 97: Line 97:
You can mount on startup using a systemd service:
You can mount on startup using a systemd service:
<pre>
<pre>
# /etc/systemd/system/terpmail.service
# ~/.config/systemd/user/terpmail.service
[Unit]
[Unit]
Description=rclone terpmail
Description=rclone terpmail
After=network.target


[Service]
[Service]
Type=simple
Type=simple
Restart=always
Restart=always
User=david
Group=david
ExecStart=/usr/bin/rclone mount terpmail: ${HOME}/terpmail --vfs-cache-mode full
ExecStart=/usr/bin/rclone mount terpmail: ${HOME}/terpmail --vfs-cache-mode full
ExecStop=/bin/fusermount -u ${HOME}/terpmail
ExecStop=/bin/fusermount -u ${HOME}/terpmail


[Install]
[Install]
WantedBy=multi-user.target
WantedBy=default.target
</pre>
Then run:
<pre>
systemctl --user daemon-reload
systemctl --user enable terpmail
systemctl --user start terpmail
</pre>
</pre>