PortValhalla/scripts/Common/Config/rclone/InstallSync.sh

15 lines
315 B
Bash
Raw Normal View History

2023-01-23 13:19:26 +00:00
#!/bin/bash
2023-01-23 15:11:51 +00:00
provider="$1";
dirname="$2";
cacheDuration="$3";
2023-01-23 15:11:51 +00:00
serviceName="rclone@$provider:$dirname";
2023-01-23 13:19:26 +00:00
if [ ! -z "${cacheDuration}" ]
then
serviceName="${serviceName}:$cacheDuration";
fi;
2023-01-23 13:19:26 +00:00
echo "Please create a remote called \`$1\`";
2024-03-09 20:35:06 +00:00
rclone config || true;
systemctl --user enable "$serviceName" --now || true;