Files
rclone/start.sh
2024-05-01 17:43:52 -04:00

17 lines
474 B
Bash

#!/bin/bash
# Set the PATH for the cron jobs
echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" > /etc/cron.d/rclone_env
# Write the RCLONE_CONFIG environment variable to the cron environment file
echo "RCLONE_CONFIG=$RCLONE_CONFIG" >> /etc/cron.d/rclone_env
# Append the contents of the CRON_JOB file to the cron environment file
cat $CRON_JOB >> /etc/cron.d/rclone_env
# Install new cron file
crontab /etc/cron.d/rclone_env
# Start cron
cron -f