Looking for guidance on startup script

What is the problem you are having with rclone?

I can successfully mount my Mega remote using the following script:

rclone mount Mega: /home/cloud/Mega --allow-other --vfs-cache-mode writes

But I'm having trouble getting my mount script to work at startup and can't find great documentation online (below is what I've pieced together based on a couple different articles I've found).

What is your rclone version (output from rclone version)

v1.54.1

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 64-bit

Which cloud storage system are you using? (eg Google Drive)

Mega

The command you were trying to run (eg rclone copy /tmp remote:tmp)

This is my startup script (not pasting my rclone config because I can already verify it works through the 'mount' command).

# /etc/systemd/system/rclone-mount-Mega.service
[Unit]
Description=rclone-mount-Mega
AssertPathIsDirectory=/home/cloud/Mega
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount \
        --config=/home/local/workspace/self-hosted/rclone/rclone.conf \
        --vfs-cache-mode writes \
		--allow-other \
        --fast-access \
		Mega: /home/cloud/Mega
ExecStop=/bin/fusermount -u /home/cloud/Mega
Restart=always
RestartSec=10
TimeoutSec=60

[Install]
WantedBy=default.target

A log from the command with the -vv flag

N/A - I'm not sure where/how to find a log as to why my startup script isn't running or is running with errors.

This isn't a valid parameter so it would error out I'd assume.

If you put --log-file /path/to/rclone.log and you'd see the errors.

I've updated my script to the following (added log, removed fast access), but nothing is being generated in the specified log file:

# /etc/systemd/system/rclone-mount-Mega.service
[Unit]
Description=rclone-mount-Mega
AssertPathIsDirectory=/home/cloud/Mega
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount \
        --config=/home/local/workspace/self-hosted/rclone/rclone.conf \
        --vfs-cache-mode writes \
		--allow-other \
		--log-file /home/local/workspace/self-hosted/rclone/rclone-mega.log \
		Mega: /home/cloud/Mega
ExecStop=/bin/fusermount -u /home/cloud/Mega
Restart=always
RestartSec=10
TimeoutSec=60

[Install]
WantedBy=default.target

What are you running?
Is the service starting?
Can you check the journalctl output?

Is the log created and empty?

The more information you can include, the better this goes.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.