I bought a cheap bicycle light for my cheap bicycle.
It's basically held on by a rubber band method.
No matter which rung you stretched it to - it wobbled when riding.
Before I could find a solution it was stolen. Easy to steal.
So I bought another one.
Today I tried an adjustable pipe bracket.
Aesthetically it is not very pretty.
But rock solid when riding and theft will now require a slotted screwdriver or 8mm socket.

