cf-nginx-ip-passthrough script fails randomly
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
I have a scheduled task which fetches and runs the cf-nginx-ip-passthrough (cf.sh) script periodically. It seems to fail at random, disabling the cloudflare.conf file and touching cf-stop. I believe this is caused by an occasional network hiccup but I can't be sure, and it highlights three problems:
- The script always returns
0so the Plesk setting to notify on error doesn't work. - If I enable notifications for every run, the emails only contain the cURL output and
Configuration applied. Restarting Nginx.On and after the fatal failure, I only receive the cURL output in the emails, so I can't be certain what going wrong. - Oddly, the
.disabledfile is always valid when I log in to intervene (I rename it back tocloudflare.confandnginx -tsucceeds), so I wonder if the code to rollback to the previous working config is broken.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cf.sh script and reproduce its scheduled execution while inspecting the cURL output, cloudflare.conf, and cf-stop behavior. Check the rollback path with nginx -t and determine what happens during an intermittent network failure. Done means failures return a nonzero status, notifications include the relevant error, and a valid previous configuration is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100