#!/usr/bin/env bash echo "aria2cd has been installed/updated successfully, but there is something extra to do." echo "" echo "If you are using user service, you need to copy /usr/share/aria2/ to " echo "" echo " means ~/.aria2 or \${XDG_CONFIG_HOME:-\${HOME}/.config}/aria2" echo "" echo "According to systemd document, you also need to enable NetworkManager-wait-online.service or systemd-networkd-wait-online.service if you want to use aria2-update-tracker.timer." echo "" echo "Notes:" echo " aria2@username.service is deprecated now, it may be removed in the future. You can use system wide aria2.service or user wide aria2.service instead." echo " Files downloaded by system service is placed at /var/lib/aria2cd/Downloads." echo "" # create_config $file function create_config() { if [[ ! -f "/etc/aria2cd/${1}" ]] then if [[ -f "/usr/share/aria2/${1}" ]] then echo "Copying ${1}..." cp "/usr/share/aria2/${1}" "/etc/aria2cd/${1}" else echo "Creating empty ${1}..." touch "/etc/aria2cd/${1}" fi else echo "${1} is found so we will skip it." fi } mkdir -p /etc/aria2cd create_config tracker-config.sh create_config aria2.conf