The *.conf scripts aren't shell scripts, so an interpreter directive of #!/bin/sh
is ONLY a nonfunctional comment in that context.
Be sure there isn't a system job with the same name, "beta". I'm assuming the .conf is in
/home/alex/.init/beta.conf
User jobs really shouldn't need the setuid/setgid part, unless you need to switch the GID to one which isn't the primary GID for the user (but is in the list as seen in output from id(1)).
The suggested "cd /home/alex/" should, according to the docs, be "chdir /home/alex", also omitting the superfluous trailing slash. It might help, but the script section will probably be enough, although seeing output would be nice - perhaps focusing on capturing the output from the (real) cd and the script might help, with:
script
export HOME=/home/ubuntu/project
{
cd $HOME/beta
python default.py -dev
} > $HOME/beta/log 2>&1
end script
Many problems related to system-managed starts of jobs like this show up in output from either id(1) or env(1), so you might add this line right before the python line:
id ; env | sort
Users' personal accounts often have modified PATH variable, extra customization scripts and dotfiles they forget about, and so on, or rely upon environment settings from .bashrc and the like which only happen during fully interactive logins (.bashrc vs .bash_login and kin, and so forth).
Note the if your system has a truly retro /bin/sh
(unlikely), the export line would have to be written as:
HOME=/home/ubuntu/project ; export HOME
:-)