From: Michael M. <ya...@au...> - 2006-04-06 02:37:13
|
On Wed, Apr 05, 2006 at 09:17:10PM +0200, Claes Wikstrom wrote: > Michael McDaniel wrote: > > > > > QUESTION: > > > > What is (one or more) way of starting yaws to use mnesia > > so that on a heart restart mnesia will still work? > > > > Seems, possibly as if there is some sort of screwup with the > mnesia_dir or something. > > So, fastest solution. Ditch the yaws flags that start mnesia > and just use a > > # yaws -r mymod .... > > and let mymod do > > application:load(mnesia), > application:setenv(mnesia ......) > application:start(mnesia, permanent). > > > or something like that > > > > /klacke ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ used sys.config per following thread http://www.erlang.org/ml-archive/erlang-questions/199902/msg00031.html My new starting command in the script is: /bin/su root -c " /usr/local/bin/yaws -sname yaws_autosys -heart \ -pa /var/yaws/ebin -D -x \ -erlarg \"-config /var/yaws/ebin/sys.config\" \ " with sys.config containing: [{mnesia, [{dir, "/var/yaws/Mnesia.yaws_autosys"}]}]. My appmod already started mnesia, I needed the directory and this solution works fine. For test I 'kill -9 pid_of_yaws' and when it restarts I have mnesia. thank you Claes and Ulf (via link), ~Michael |