doc:appunti:linux:sa:liquidfeedback
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:appunti:linux:sa:liquidfeedback [2012/11/11 13:20] – [Cronjob] niccolo | doc:appunti:linux:sa:liquidfeedback [2012/11/11 13:27] – [Install a second instance of LiquidFeedback on the same host] niccolo | ||
---|---|---|---|
Line 176: | Line 176: | ||
===== lf_update daemon ===== | ===== lf_update daemon ===== | ||
- | The script | + | The **'' |
< | < | ||
Line 183: | Line 183: | ||
</ | </ | ||
- | We must prepare a script that runs in an endless loop **''/ | + | We must prepare a script that runs in an endless loop, **''/ |
<code bash> | <code bash> | ||
Line 206: | Line 206: | ||
</ | </ | ||
- | and a script that start/stop the daemon **''/ | + | The script contains database credentials, |
+ | |||
+ | < | ||
+ | chown root:root / | ||
+ | chmod 750 / | ||
+ | </ | ||
+ | |||
+ | Then preare | ||
<code bash> | <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 313: | 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 ===== | ||
doc/appunti/linux/sa/liquidfeedback.txt · Last modified: 2012/11/11 13:58 by niccolo