Skip to content

Commit

Permalink
update addons/rclone.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
centminmod committed Oct 28, 2016
1 parent 37c0590 commit c9debb7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion addons/rclone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,17 @@ return
}

###########################################################
csf_port() {
SSH_CLIENTIPADDR=$(echo "${SSH_CLIENT%% *}")
echo
if [[ -f /etc/csf/csf.allow && -z "$(grep "tcp|in|d=53682|s=$SSH_CLIENTIPADDR" /etc/csf/csf.allow)" ]]; then
echo "open port 53682 for rclone web server"
echo "tcp|in|d=53682|s=$SSH_CLIENTIPADDR" >> /etc/csf/csf.allow
csf -r >/dev/null 2>&1
tail -1 /etc/csf/csf.allow
fi
}

rclone_config() {
echo
echo "------------------------------------------------"
Expand All @@ -120,6 +131,7 @@ rclone_config() {
echo
sleep 3
if [ -f /usr/sbin/rclone ]; then
# csf_port
rclone config
fi
}
Expand Down Expand Up @@ -305,7 +317,7 @@ echo
tail -1 "${CENTMINLOGDIR}/rclone_sync_${DT}.log"
;;
*)
echo "$0 {install|update|copy|sync}"
echo "$0 {config|install|update|copy|sync}"
;;
esac
exit

0 comments on commit c9debb7

Please sign in to comment.