ugps: fix and improve init script