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";
|
||||
|
||||
systemctl --user start "$serviceName";
|
||||
systemctl --user enable "$serviceName" --now;
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/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;
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
[Unit]
|
||||
Description=rclone Service Starter
|
||||
Documentation=man:rclone(1)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=bash -c 'systemctl --user start rclone@*.service'
|
||||
Type=simple
|
||||
ExecStart=bash -c 'systemctl --user start --no-block rclone.target'
|
||||
|
||||
[Install]
|
||||
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]
|
||||
Description=rclone: Remote FUSE filesystem for cloud storage config %i
|
||||
Documentation=man:rclone(1)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
|
@ -22,3 +20,6 @@ ExecStop=bash -c '/bin/fusermount -zu "%h/${EXPRESSION#*":"}"'
|
|||
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=rclone.target
|
||||
|
|
Loading…
Reference in a new issue