Refactor rclone installation
This commit is contained in:
parent
57491fab65
commit
2ccace3ba7
5 changed files with 10 additions and 8 deletions
|
@ -8,4 +8,4 @@ rclone config;
|
||||||
|
|
||||||
mkdir -p ~/"$dirname";
|
mkdir -p ~/"$dirname";
|
||||||
|
|
||||||
systemctl --user start "$serviceName";
|
systemctl --user enable "$serviceName" --now;
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
sudo cp "${BASH_SOURCE%/*}/rclone.service" "${BASH_SOURCE%/*}/rclone@.service" /etc/systemd/user;
|
sudo cp "${BASH_SOURCE%/*}/rclone.service" "${BASH_SOURCE%/*}/rclone.target" "${BASH_SOURCE%/*}/rclone@.service" /etc/systemd/user;
|
||||||
systemctl enable --user rclone;
|
systemctl enable --user rclone;
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=rclone Service Starter
|
Description=rclone Service Starter
|
||||||
Documentation=man:rclone(1)
|
Documentation=man:rclone(1)
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=simple
|
||||||
ExecStart=bash -c 'systemctl --user start rclone@*.service'
|
ExecStart=bash -c 'systemctl --user start --no-block rclone.target'
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
|
|
3
scripts/Common/Config/rclone/rclone.target
Normal file
3
scripts/Common/Config/rclone/rclone.target
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[Unit]
|
||||||
|
Description=rclone Mounts
|
||||||
|
Documentation=man:rclone(1)
|
|
@ -1,8 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=rclone: Remote FUSE filesystem for cloud storage config %i
|
Description=rclone: Remote FUSE filesystem for cloud storage config %i
|
||||||
Documentation=man:rclone(1)
|
Documentation=man:rclone(1)
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=notify
|
Type=notify
|
||||||
|
@ -22,3 +20,6 @@ ExecStop=bash -c '/bin/fusermount -zu "%h/${EXPRESSION#*":"}"'
|
||||||
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=rclone.target
|
||||||
|
|
Loading…
Reference in a new issue