Am Montag, 24. Oktober 2011, 11:52:46 schrieb Iván Martínez:
> Hello all,
> I have a couple of questions about installing Zotonic in a production
> server:
>
> - Where do you install Zotonic in production servers, in "/home/
> zotonic"? (I suppose there isn't a single answer, I just want to know
> what other administrators do).
that's what I did.
> - I need Zotonic to start after system reboot. Does anyone have a
> "init.d" script, or uses another method to achieve this?.
I wrote a basic init.d-script for debian 6.0 today. Supports start, stop,
status and restart. It's not very polished at the moment, but does the job.
Could mail it to you, if interested.
> Thank you,
> Ivan
Best,
Michael
In theory Zotonic can be installed anywhere. But it is more common to install in /home/.
@Michael,
I would love a copy of your init.d script. I still can't restart server using ./bin/zotonic restart (hosted at Webfaction).
Best,
Daniel
arjan@srv1:~$ cat /etc/init.d/zotonic
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: zotonic
# Required-Start: $postgres $local_fs $remote_fs $network $time
# Required-Stop: $postgres $local_fs $remote_fs $network $time
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Zotonic default
### END INIT INFO
/usr/bin/sudo -u zotonic /home/zotonic/zotonic/bin/zotonic $1
On 10/25/2011 02:10 AM, Daniel O'Connell wrote:
> Hi Ivan,
>
> In theory Zotonic can be installed anywhere. But it is more common to install in /home/.
>
> @Michael,
>
> I would love a copy of your init.d script. I still can't restart server using ./bin/zotonic restart (hosted at Webfaction).
>
> Best,
> Daniel
>
>
> On Oct 24, 2011, at 12:59 PM, Michael Schreckenbauer wrote:
>
>> Hi,
>>
Am Sonntag, 30. Oktober 2011, 06:58:50 schrieb Iván Martínez:
> Thank you Arjan and Michael. I have installed in "/home/zotonic" and
> I'm using Arjan's script, but I get the following error:
>
> [root@masterion zotonic]# /etc/init.d/zotonic start
> Starting zotonic zoton...@masterion.com
> /usr/bin/env: escript: No such file or directory
> make[1]: *** [compile] Error 127
> make: *** [gen_smtp] Error 2
> /home/zotonic/zotonic/src/scripts/zotonic-start: line 24: erl: command
> not found
I think you need to add the path to erlang in your initscript.
I use
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
My erlang is installed in /usr/local/bin
> Starting with zotonic.sh works fine.
zotonic.sh sets
ERL="/usr/local/bin/erl"
It seems you have installed erlang, where I have, so this works.
> By the way, there seems to be a problem with file permissions in
> Zotonic 0.7.1, the files below don't have execution permission:
> zotonic/src/scripts/zotonic-status
It has in my installation.
> zotonic/doc/zotonic.sh
> Also, why is "zotonic.sh" in the doc folder?.
Afaik zotonic.sh is deprecated. But I'm not sure about this.
Yes. The idea is that you use the 'bin/zotonic' command, which is a
replacement for the old zotonic.sh. It should probably be removed..
I still would like to make zotonic into a debian package. But I'm not
really sure how this would work, with the sites et cetera..
Arjan
I've seen this same issue, while being on a windows system. All
src/scripts/* files had x perm, except zotonic-status.
Since it was so easy to fix, I didn't investigate it further...
//Andreas
Try setting it in the initscript. The PATH, that's available to these scripts
might be different from your "normal" PATH. Just add the line below to the top
of the script after the LSB-comments. If it does not work, I was wrong. Still
worth a try imo.
Best,
Michael
> PostgreSQL starts but Zotonic doesn't, while both seem to be
> configured the same way. I haven't seen any error report, not even in /
> access/log (there is an empty "access.log.2011..." file there).
Is there anything in priv/sasl? (sasl.log and zotonic.log)
Regards,
Atilla
Atilla
2011/11/5 Iván Martínez <super...@gmail.com>:
thanks a lot for this little how to :)
Best,
Michael