Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftppush script stuck on grepping FTP_DIR_HOUR. #176

Closed
BytEvil opened this issue Jun 7, 2022 · 1 comment
Closed

ftppush script stuck on grepping FTP_DIR_HOUR. #176

BytEvil opened this issue Jun 7, 2022 · 1 comment

Comments

@BytEvil
Copy link

BytEvil commented Jun 7, 2022

Hi. ftppush script stuck on grepping FTP_DIR_HOUR, but folder persist and files not sending to ftp after wifi reconnection or after reboot.
https://imgur.com/3p0ZHwX

@BytEvil
Copy link
Author

BytEvil commented Jun 9, 2022

curl works fine.

this block changed (ftppush.sh):

if [ "${FTP_DIR_TREE}" == "yes" ]; then
		if [ ! -z "${FTP_DIR_HOUR}" ]; then
			# Create hour directory on FTP server
			echo -e "USER ${FTP_USERNAME}\r\nPASS ${FTP_PASSWORD}\r\nmkd ${FTP_DIR}/${FTP_DIR_HOUR}\r\nquit\r\n" | nc -w 5 ${FTP_HOST} 21 | grep "${FTP_DIR_HOUR}"
			FTP_DIR_HOUR="${FTP_DIR_HOUR}/"
		fi
fi

to:

if [ "${FTP_DIR_TREE}" == "yes" ]; then
		if [ ! -z "${FTP_DIR_HOUR}" ]; then
			# Create hour directory on FTP server
			curl ftp://${FTP_USERNAME}:${FTP_PASSWORD}@${FTP_HOST}/${FTP_DIR}/${FTP_DIR_HOUR}/ --ftp-create-dirs >/dev/null 2>&1
		fi
fi

curl can be found here, cacert.pem can be found here, if u want to use curl to iteraction with your telegram bot.

@alienatedsec alienatedsec closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants