Make postinstall work for CentOS/RHEL packages as well.

Gogs can now be easily installed on CentOS/RHEL 6.x (see https://packager.io/gh/pkgr/gogs#pkgr).