You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/www-apps/liquid_feedback_frontend/files/postinstall-en.txt

53 lines
2.5 KiB

0. DATABASE SETUP
To use Liquid Feedback you have to follow these
simple steps, which have to be done as the postgres system user (or
which ever is the database superuser):
$ createuser liquid_feedback
and answer the following
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
$ psql
postgres=# ALTER USER liquid_feedback WITH PASSWORD 'the_new_password';
$ createdb -U liquid_feedback liquid_feedback
$ psql -U liquid_feedback liquid_feedback
liquid_feedback=# \i ${MY_INSTALLDIR}/liquid_feedback_core/core.sql
liquid_feedback=# \i ${MY_INSTALLDIR}/liquid_feedback_core/init.sql
INSERT INTO system_setting (member_ttl) VALUES ('1 year');
INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 hour', 20, 6);
INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 day', 80, 12);
INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 hour', 200, 60);
INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 day', 800, 120);
INSERT INTO policy (index, name, admission_time, discussion_time, verification_time, voting_time, issue_quorum_num, issue_quorum_den, initiative_quorum_num, initiative_quorum_den) VALUES (1, 'Default policy', '8 days', '15 days', '8 days', '15 days', 10, 100, 10, 100);
cd /var/lib/liquid_feedback_frontend
/usr/lib/webmcp/framework/bin/webmcp_shell myconfig
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
> member = Member:by_id(1)
> member:set_password("type-password-here")
> member:save()
> os.exit()
Ensure that "lf_update dbname=liquid_feedback" and
"lf_update_suggestion_order dbname=liquid_feedback" are called
regularly! It is required to run these commands regularly
(i.e. every 5 minutes via cron) to update cached supporter counts,
to change the state of issues when neccessary, to calculate the
result of votings, etc. If you wish, copy the created lf_update
and lf_update_suggestion_order files to /usr/local/bin or a
similar directory.
It is possible to run these two commands in parallel, if a setup
requires splitting the load to multiple processor cores. In other
cases it is recommended to run "lf_update" first, and then
"lf_update_suggestion_order".
To create an export file, which is containing all but private data,
you may use the lf_export shell-script:
$ lf_export liquid_feedback export.sql.gz