Make init script working in both python3 and python2