#!/bin/bash

HOSTNAME=$(hostname)
RCLONE_ADDRESS="$HOSTNAME.swallow-grue.ts.net:44444"
RCLONE_CRED="rcd"
RCLONE_SCRIPT_FILE=$(basename "$0") 
RCLONE_LOG_FILE=/var/log/rclone/"$RCLONE_SCRIPT_FILE".log
[[ ! -f "$RCLONE_LOG_FILE" ]] && touch "$RCLONE_LOG_FILE"

rclone rc job/list \
--rc-addr="$RCLONE_ADDRESS" \
--rc-user="$RCLONE_CRED" \
--rc-pass="$RCLONE_CRED" \
--log-file "$RCLONE_LOG_FILE"