Changes between Version 5 and Version 6 of installation


Ignore:
Timestamp:
01/12/2012 05:47:21 PM (17 months ago)
Author:
dark
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • installation

    v5 v6  
    1 = How to install LiquidFeedback (stable) on a Debian system with lighttpd 
     1= How to install LiquidFeedback (stable) on a Debian squeeze system with lighttpd 
    22 
    33 
     
    257257}}} 
    258258 
    259 Ensure that "lf_update dbname=liquid_feedback" is executed regulary, e.g. by running the following script as daemon. 
     259The command "lf_update dbname=liquid_feedback" has to be executed regulary. Create the following shell script to call this command in an endless loop: 
    260260{{{ 
    261261vi /opt/liquid_feedback_core/lf_updated 
     
    280280}}} 
    281281 
     282Create the following init-script for lf_updated... 
     283{{{ 
     284vi /etc/init.d/lf_updated 
     285}}} 
     286{{{ 
     287#! /bin/sh 
     288### BEGIN INIT INFO 
     289# Provides:          lf_updated 
     290# Required-Start:    $syslog 
     291# Required-Stop:     $syslog 
     292# Default-Start:     2 3 4 5 
     293# Default-Stop:      0 1 6 
     294# Short-Description: lf_updated 
     295# Description:       Calls LiquidFeedback lf_update regulary 
     296### END INIT INFO 
     297 
     298# PATH should only include /usr/* if it runs after the mountnfs.sh script 
     299PATH=/sbin:/usr/sbin:/bin:/usr/bin 
     300DESC="lf_updated" 
     301NAME=lf_updated 
     302DAEMON=/opt/liquid_feedback_core/lf_updated 
     303DAEMON_ARGS="" 
     304PIDFILE=/var/run/$NAME.pid 
     305SCRIPTNAME=/etc/init.d/$NAME 
     306 
     307. /lib/lsb/init-functions 
     308 
     309do_start() 
     310{ 
     311        start-stop-daemon -b --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1 
     312        start-stop-daemon -b --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2 
     313} 
     314 
     315do_stop() 
     316{ 
     317        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME 
     318        RETVAL="$?" 
     319        [ "$RETVAL" = 2 ] && return 2 
     320        start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON 
     321        [ "$?" = 2 ] && return 2 
     322        rm -f $PIDFILE 
     323        return "$RETVAL" 
     324} 
     325 
     326case "$1" in 
     327  start) 
     328        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" 
     329        do_start 
     330        case "$?" in 
     331                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 
     332                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 
     333        esac 
     334        ;; 
     335  stop) 
     336        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" 
     337        do_stop 
     338        case "$?" in 
     339                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 
     340                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 
     341        esac 
     342        ;; 
     343  status) 
     344       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? 
     345       ;; 
     346  restart|force-reload) 
     347        log_daemon_msg "Restarting $DESC" "$NAME" 
     348        do_stop 
     349        case "$?" in 
     350          0|1) 
     351                do_start 
     352                case "$?" in 
     353                        0) log_end_msg 0 ;; 
     354                        1) log_end_msg 1 ;; # Old process is still running 
     355                        *) log_end_msg 1 ;; # Failed to start 
     356                esac 
     357                ;; 
     358          *) 
     359                # Failed to stop 
     360                log_end_msg 1 
     361                ;; 
     362        esac 
     363        ;; 
     364  *) 
     365        echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 
     366        exit 3 
     367        ;; 
     368esac 
     369 
     370: 
     371}}} 
     372 
     373... and make the init script executable and let it start automatically at boot time 
     374{{{ 
     375chmod +x /etc/init.d/lf_updated 
     376update-rc.d-insserv lf_updated defaults 
     377}}} 
     378 
    282379 
    283380Restart the webserver: