Estou tentando executar o rclone-mount no terminal, ele funciona bem, mas não funciona como um serviço (obviamente eu quero autostart isto assim eu não tenho que digitar mount everytime eu reinicio).
Terminal (funciona bem):
/usr/bin/rclone mount --allow-non-empty box:/mydir /home/user1/mydir/
Como systemd
service (não está funcionando).
Então, quando eu reinicio meu PC, vejo:
o-pc:~$ sudo systemctl status rclone-mount
[sudo] password for user1:
● rclone-mount.service - rclone mount service
Loaded: loaded (/etc/systemd/system/rclone-mount.service; static; vendor pres
Active: inactive (dead)
Docs: http://rclone.org/docs/
sep 27 13:51:55 o-pc systemd[1]: /etc/systemd/system/rclone-mo
SO: Ubuntu 18.04.1
config
o-pc:~$ cat /etc/systemd/system/rclone-mount.service
# Rclone mount on boot ( service file template - add aditional rclone parameters )
# Copy file to: /etc/systemd/system
# Set remote name (current acdcrypt), path to mount and User,Group (current plex)
# Register new service by typing:
# sudo systemctl daemon-reload
# sudo systemctl enable rclone-mount.service
# systemctl start rclone-mount.service
# systemctl enable NetworkManager-wait-online.service
# Usage:
# To unmount drive use
# systemctl stop rclone-mount.service
# To mount use:
# systemctl start rclone-mount.service
[Unit]
Description=rclone mount service
Documentation=http://rclone.org/docs/
After=network-online.target
BindsTo=network-online.target
[Service]
Type=simple
User=user1
Group=user1
ExecStart=/usr/bin/rclone mount --allow-non-empty box:/mydir /home/user1/mydir/
ExecStop=/usr/bin/fusermount -uz ~/mydir/
[Install]
Wants=network-online.target
o-pc:~$
Tags systemd systemctl ubuntu-18.04