I haven't build-tested this, but looks good to me and would be fine from my pov if you tested it.
I'd suggest having a --configure flag for the username and pathnames and either keeping root or cpsusers hardcoded in the packaging (but ideally not keep disabled dead packaging code if it's not needed).