Skip to content

Bash debug calling stack

I’m using a generic procedure to trap and describe the error or abnormal situations, instead of the usual ‘2>…’ error construct. The idea will be to have a procedure like this simplified version: and then, used as in this example: The issues are: BASH_SOURCE is the running source. T…

Create a heredoc that doesn’t interpret anything

I’m writing a script for a friend who is not experienced with bash. The script generates a backup script, generates a crontab and runs crontab to create a cron job. I want to date these backups, so currently the script (what’s relevant) is: This, however, generates finalCutScript.bash with the dat…

How to avoid defunct python processes in Linux?

With python3 (3.4.3) on Ubuntu 14.04 I have created a Forker class which I use in two different processes to create child processes. Here is the Forker class: In the two different Linux processes I derive from this class and then call e.g. something like: However, I still get a couple of defunct python proces…

PHP Xdebug Netbeans Breakpoints

After working fine, with no config changes for months xdebug/netbeans is now useless. I can create breakpoints but whenever it has ‘stepped in’ to a further scope its impossible to step thru and simply jumps out of the inner scope to the caller. There are no exceptions generated. Using tail -f xde…

Apache Access Control to IPs (X-Forwarded-For) or valid-user

I used to block access to certain folder of my Apache server using valid-user or ip directive, like the following: Now, I have placed my server behind an F5-BIGIP device which won’t let me fully DNAT client’s connections. The device is also behind a Linux server that serves as gateway with DNAT/SN…