you can put something in /Library/StartupItems
make web2py in this folder
create StartupParameters.plist with something like:
{
Description = "web2py";
Provides = ("web2py");
Requires = ("Disks", "Resolver");
OrderPreference = "Last";
Messages =
{
start = "Starting web2py custom";
stop = "Stopping web2py custom";
restart = "Restarting web2py custom";
};
}
create web2py and put this in it
#!/bin/sh
##
# web2py service
##
. /etc/rc.common
StartService ()
{
/usr/bin/python /path/to/web2py/web2py.py -M -a \<recycle\> -p 8080 &
}
StopService ()
{
/usr/bin/killall python # or something like this or some other way
to stop web2py.py
}
RestartService ()
{
StopService;
StartService;
}
RunService "$1"
Then it should start at reboot or do:
SystemStarter start web2py
or to stop
SystemStarter stop web2py
or you can configure apache to use wsgi
the latter would be better for higher usage situations.....
-wes
On Tue, Mar 2, 2010 at 10:30 PM, Al <[email protected]> wrote:
> Hi,
>
> Can anyone advise how I can setup web2py to start automatically when
> the machine is turned on? i.e the services should all be started
> without having to login.
> How can that be done with plist and startup items?
>
> Cheers
> Al
>
> --
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/web2py?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.