Hi Matt,

first and most important problem is; your starting web2py with root
privileges which is no no :),
second on slackware if my memory serves me well it's support for SYSV type
of script was very bad (long time ago...)
third stat_busy and other functions are not portable between distributions.

Please use su -u username  -c "python bla_bla" or sudo -u username "python
bla_bla".


P.S. thanks for effort and don't be offended by this what I wrote, enjoy
with web2py ! :)

On Wed, Mar 25, 2009 at 9:53 PM, [email protected] <[email protected]>wrote:

>
> Hello all,
>
> I'm a web developer just getting my feet wet with web2py.  I just
> wrote my own daemon for web2py for the archlinux distribution which I
> am using, so  I though I'd share it in hopes that you'd bundle it with
> the whole package.  It's not tested on any other distro besides
> archlinux, but my guess is it might work on slackware too.
>
> Thanks,
>
> Matt Belisle
>
> begin text:
> #!/bin/bash
> # This is the web2py daemon (web2pyd) for archlinux.  It is
> recommended that you save the web2py
> # folder as /usr/lib/web2py, but if it's somewhere else just modify
> the variable below.
> # Author: Matt Belisle [email protected]
>
> # Default folder
> # WEB2PY_FOLDER="/your/custom/folder"
> WEB2PY_FOLDER="/usr/lib/web2py"
>
> . /etc/rc.conf
> . /etc/rc.d/functions
> case "$1" in
>  start)
>    stat_busy "Starting web2py Daemon"
>    pkill -f web2py.py &> /dev/null
>    python ${WEB2PY_FOLDER}/web2py.py -a "<recycle>" -P -p 8000 &> /
> dev/null &
>    add_daemon web2pyd
>    stat_done
>    ;;
>  stop)
>    stat_busy "Stopping web2py Daemon"
>    pkill -f web2py.py &> /dev/null
>    rm_daemon web2pyd
>    stat_done
>    ;;
>  restart)
>    $0 stop
>    sleep 1
>    $0 start
>    ;;
>  *)
>    echo "usage: $0 {start|stop|restart}"
> esac
> exit 0
>
> >
>


-- 
"Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former."-Albert Einstein

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to