diff --git a/Systemd-rclone-mount.md b/Systemd-rclone-mount.md index 6133f2e..2ae4071 100644 --- a/Systemd-rclone-mount.md +++ b/Systemd-rclone-mount.md @@ -105,41 +105,50 @@ WantedBy=default.target ``` # Service installation -Save the above file to `/etc/systemd/user/rclone@.service`. The "@" at the end of the name of the service is what makes the service a templated service and is passed to the service file as the `%i` placeholder. After saving the file to the file system, you need to issue the following command to tell systemd to look for the new service file (this will also need done if you change the service file) +Save the above file to `/etc/systemd/user/rclone@.service`. The "@" at the end of the name of the service is what makes the service a templated service and is passed to the service file as the `%i` placeholder. After saving the file to the file system, you need to issue the following command to tell systemd to look for the new service file (this will also need done if you change the service file) + `systemctl --user daemon-reload` Congratulations, the service is now installed! **Read on for instructions on how to use the installed systemd service.** ## Notes This is a templated user service. -Lets start with what it means to be a user service. Basically, you don't need to be root to use this. As long as rclone is installed, and the user has their rclone remotes configured, they can start and stop this service themselves without the need for administrator privileges. -As for being a templated service, that means that this service can be invoked multiple times for different situations without needing to change the service file. This should allow for basic usage by most users. The advanced usage described below should cover most other cases. + +Lets start with what it means to be a user service. Basically, you don't need to be root to use this. As long as rclone is installed, and the user has their rclone remotes configured, they can start and stop this service themselves without the need for administrator privileges. + +As for being a templated service, that means that this service can be invoked multiple times for different situations without needing to change the service file. This should allow for basic usage by most users. The advanced usage described below should cover most other cases. # Service usage (basic) ## Prerequisites * Hopefully this goes without saying, but rclone must be installed -* The cloud service (remote) must already be configured with rclone. See the rclone config documentation for this -* The configuration file for rclone is in its default location (~/.config/rclone/rclone.conf) +* The cloud service (remote) must already be configured with rclone. See the [rclone config documentation](https://rclone.org/docs/) for this +* The configuration file for rclone is in its default location (`~/.config/rclone/rclone.conf`) * There is a mount directory (that is empty and for which you have write permissions) at the location of `~/` ## Example For this example, I am assuming rclone is installed and that the remote you have configured is called "dropbox-personal". + If you can run the command `rclone lsd dropbox-personal:` and get a listing of your top directories, then your remote is configured already. + You will need to make the directory to mount your remote. This can be accomplished with the following command: `mkdir ~/dropbox-personal` + Now that we have satisfied the prerequisites, it is time to mount your remote. you can mount it by issuing the command `systemctl --user start rclone@dropbox-personal`. You should now be able to navigate to `~/dropbox-personal` and explore the files you have in your remote. + Once you are sure the mount it is working, you can enable it so that the remote is automatically mounted at login. This is done with the following command `systemctl --user enable rclone@dropbox-personal`. # Service usage (advanced) ## What is advanced usage? Advanced usage allows for overriding any of the default behaviors specified in the service file. Default behaviors are specified by environment variables (`Environment=...`) in the service file. + The variables are able to be overriden by specifying a systemd environment file located at `~/.config/rclone/