bash: cleanup and custom host rc checks