Unity Asset Server on Ubuntu

Installing Unity Asset Server on Ubuntu
After spending a long time figuring out the problems with the Unity Asset Server on Ubuntu, I have made a patch that should make it work. The patch is tested on with unity_asset_server-1.0.0 and Ubuntu 9.04 Server Edition.

Build
apt-get build-dep postgresql # install postgresql build dependencies tar xzf unity_asset_server-1.0.0.tgz cd unity_asset_server-1.0.0 patch -p1 <../unity_asset_server-1.0.0-ubuntu.patch ./install.sh
 * 1) download unity_asset_server-1.0.0 source package
 * 2) download unity_asset_server-1.0.0-ubuntu.patch

Patch Notes
Due to Ubuntu using dash as the default shell and the unity asset server install scripts assume that  is Bash, the following files have their shebang line changed from   to  : install.sh unity_build/reset_admin_password.sh unity_build/unity_asset_server.sysvinit

is fixed according to this forum post.

also needs a fix to use Bash. Make does not use the default SHELL, so we need to add this line at the top: SHELL=/bin/bash

Problems
To start over building, do these steps:

/etc/init.d/unity_asset_server stop pstree # check that 'postmaster' is not running, and if so, kill it rm -fr /opt/unity_asset_server
 * 1) delete the unpacked source, and re-unpack

After running, check. If it contains: Could not initialize database directory the Unity database schema was not installed. Try reinstalling.