doc:appunti:linux:sa:liquidfeedback
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:linux:sa:liquidfeedback [2012/11/11 12:42] – [Configure the mail subsystem] niccolo | doc:appunti:linux:sa:liquidfeedback [2012/11/11 13:58] (current) – [LiquidFeedback administration] niccolo | ||
|---|---|---|---|
| Line 105: | Line 105: | ||
| < | < | ||
| cd / | cd / | ||
| - | cp example.lua | + | cp example.lua |
| + | chgrp www-data campibisenzio5stelle.lua | ||
| + | chmod 640 campibisenzio5stelle.lua | ||
| </ | </ | ||
| + | |||
| + | The configuration file must be readable by the web server process, but not readable by others, because it can contains database credentials and other sensitive data. | ||
| The configuration name (**'' | The configuration name (**'' | ||
| + | |||
| + | Then you must adjust the configuration of the Frontend, this is an example of values changed from defaults: | ||
| + | |||
| + | < | ||
| + | config.instance_name = " | ||
| + | config.app_service_provider = " | ||
| + | config.absolute_base_url = " | ||
| + | config.database = { host=' | ||
| + | rocketwiki= "/ | ||
| + | compat = "/ | ||
| + | config.default_lang = " | ||
| + | config.mail_envelope_from = " | ||
| + | config.mail_from = { name = " | ||
| + | </ | ||
| ==== Database (the Core) ==== | ==== Database (the Core) ==== | ||
| Line 156: | Line 174: | ||
| INSERT INTO member (login, name, admin, invite_code) VALUES (' | INSERT INTO member (login, name, admin, invite_code) VALUES (' | ||
| </ | </ | ||
| - | ===== Cronjob | + | ===== lf_update daemon |
| + | |||
| + | The **'' | ||
| < | < | ||
| Line 163: | Line 183: | ||
| </ | </ | ||
| + | We must prepare a script that runs in an endless loop, **''/ | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/sh | ||
| + | |||
| + | PIDFILE="/ | ||
| + | PID=$$ | ||
| + | |||
| + | if [ -f " | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | |||
| + | echo " | ||
| + | |||
| + | while true; do | ||
| + | nice / | ||
| + | " | ||
| + | | logger -t " | ||
| + | sleep 5 | ||
| + | done | ||
| + | </ | ||
| + | |||
| + | The script contains database credentials, | ||
| + | |||
| + | < | ||
| + | chown root:root / | ||
| + | chmod 750 / | ||
| + | </ | ||
| + | |||
| + | Then preare a script that start/stop the daemon, **''/ | ||
| + | |||
| + | <code bash> | ||
| + | #! /bin/sh | ||
| + | ### BEGIN INIT INFO | ||
| + | # Provides: | ||
| + | # Required-Start: | ||
| + | # Required-Stop: | ||
| + | # Default-Start: | ||
| + | # Default-Stop: | ||
| + | # Short-Description: | ||
| + | # Description: | ||
| + | ### END INIT INFO | ||
| + | |||
| + | # PATH should only include /usr/* if it runs after the mountnfs.sh script | ||
| + | PATH=/ | ||
| + | DESC=" | ||
| + | NAME=lf_updated | ||
| + | DAEMON=/ | ||
| + | DAEMON_ARGS="" | ||
| + | PIDFILE=/ | ||
| + | SCRIPTNAME=/ | ||
| + | |||
| + | . / | ||
| + | |||
| + | do_start() | ||
| + | { | ||
| + | start-stop-daemon -b --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1 | ||
| + | start-stop-daemon -b --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2 | ||
| + | } | ||
| + | |||
| + | do_stop() | ||
| + | { | ||
| + | start-stop-daemon --stop --quiet --retry=TERM/ | ||
| + | RETVAL=" | ||
| + | [ " | ||
| + | start-stop-daemon --stop --quiet --oknodo --retry=0/ | ||
| + | [ " | ||
| + | rm -f $PIDFILE | ||
| + | return " | ||
| + | } | ||
| + | |||
| + | case " | ||
| + | start) | ||
| + | [ " | ||
| + | do_start | ||
| + | case " | ||
| + | 0|1) [ " | ||
| + | 2) [ " | ||
| + | esac | ||
| + | ;; | ||
| + | stop) | ||
| + | [ " | ||
| + | do_stop | ||
| + | case " | ||
| + | 0|1) [ " | ||
| + | 2) [ " | ||
| + | esac | ||
| + | ;; | ||
| + | status) | ||
| + | | ||
| + | ;; | ||
| + | restart|force-reload) | ||
| + | log_daemon_msg " | ||
| + | do_stop | ||
| + | case " | ||
| + | 0|1) | ||
| + | do_start | ||
| + | case " | ||
| + | 0) log_end_msg 0 ;; | ||
| + | 1) log_end_msg 1 ;; # Old process is still running | ||
| + | *) log_end_msg 1 ;; # Failed to start | ||
| + | esac | ||
| + | ;; | ||
| + | *) | ||
| + | # Failed to stop | ||
| + | log_end_msg 1 | ||
| + | ;; | ||
| + | esac | ||
| + | ;; | ||
| + | *) | ||
| + | echo " | ||
| + | exit 3 | ||
| + | ;; | ||
| + | esac | ||
| + | |||
| + | : | ||
| + | </ | ||
| + | |||
| + | Activate the start/stop script at bootstrap: | ||
| + | |||
| + | < | ||
| + | chmod 755 / | ||
| + | insserv lf_updated | ||
| + | </ | ||
| + | |||
| + | The daemon logs to syslog with the **'' | ||
| ===== Configuring Apache ===== | ===== Configuring Apache ===== | ||
| Line 266: | Line 413: | ||
| FIXME Verify if this checklist is complete. | FIXME Verify if this checklist is complete. | ||
| - | - Create another database. | + | - Create another |
| - | - Create another Apache VirtualHost and declare the configuration filename in **'' | + | - Create another |
| - Create another config file in ''/ | - Create another config file in ''/ | ||
| + | - Add or update the **'' | ||
| ===== LiquidFeedback administration ===== | ===== LiquidFeedback administration ===== | ||
| - | ^ unit | Administrators allow each user partecipate (or not) to the existing units. | + | ^ Eng ^ Ita ^ Note ^ |
| - | ^ area | An unit can contain one or more areas. An user can partecipate to an area and he can delegate the entire area to someone else. | | + | ^ unit |
| - | ^ issue | + | ^ area |
| - | ^ policy | + | ^ issue ^ |
| + | ^ policy | ||
| + | |||
| + | An user with the admin right can login and click on the **// | ||
| + | |||
| + | The first task for an administrator is to create some **units** containing some **areas**, where users can partecipate. From //Admin// -> //Units// -> //Create new unit// or //Edit areas//. | ||
| + | |||
| + | Then the administrator create invite codes for new users. When creating a new user the admin define the login name (the identification), | ||
| - | An user with the admin right can login and click on the **// | ||
doc/appunti/linux/sa/liquidfeedback.1352634136.txt.gz · Last modified: by niccolo
