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

15 lines
315 B
Bash
Executable file

#!/bin/bash
provider="$1";
dirname="$2";
cacheDuration="$3";
serviceName="rclone@$provider:$dirname";
if [ ! -z "${cacheDuration}" ]
then
serviceName="${serviceName}:$cacheDuration";
fi;
echo "Please create a remote called \`$1\`";
rclone config || true;
systemctl --user enable "$serviceName" --now || true;