View | Details | Raw Unified | Return to bug 23400
Collapse All | Expand All

(-)a/debian/docs/koha-indexer.xml (-1 / +8 lines)
Lines 24-30 Link Here
24
  <refsynopsisdiv>
24
  <refsynopsisdiv>
25
    <cmdsynopsis>
25
    <cmdsynopsis>
26
      <command>koha-indexer</command>
26
      <command>koha-indexer</command>
27
      <arg choice="req"><option>--start</option>|<option>--stop</option>|<option>--restart</option>|<option>--help</option>|<option>-h</option>|<option>--quiet</option>|<option>-q</option></arg>
27
      <arg choice="req"><option>--start</option>|<option>--stop</option>|<option>--restart</option>|<option>--status</option>|<option>--help</option>|<option>-h</option>|<option>--quiet</option>|<option>-q</option></arg>
28
      <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg>
28
      <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg>
29
    </cmdsynopsis>
29
    </cmdsynopsis>
30
  </refsynopsisdiv>
30
  </refsynopsisdiv>
Lines 55-60 Link Here
55
    </varlistentry>
55
    </varlistentry>
56
56
57
    <varlistentry>
57
    <varlistentry>
58
      <term><option>--status</option></term>
59
      <listitem>
60
        <para>Show the status of the indexer for the specified instances.</para>
61
      </listitem>
62
    </varlistentry>
63
64
    <varlistentry>
58
      <term><option>--quiet|-q</option></term>
65
      <term><option>--quiet|-q</option></term>
59
      <listitem>
66
      <listitem>
60
        <para>Make the script quiet about non existent instance names. Useful when calling <command>koha-indexer</command> from another scripts.</para>
67
        <para>Make the script quiet about non existent instance names. Useful when calling <command>koha-indexer</command> from another scripts.</para>
(-)a/debian/scripts/koha-indexer (-1 / +19 lines)
Lines 47-52 $scriptname -h|--help Link Here
47
    --start               Start the indexer daemon for the specified instances
47
    --start               Start the indexer daemon for the specified instances
48
    --stop                Stop the indexer daemon for the specified instances
48
    --stop                Stop the indexer daemon for the specified instances
49
    --restart             Restart the indexer daemon for the specified instances
49
    --restart             Restart the indexer daemon for the specified instances
50
    --status              Show the status of the indexer for the specified instances
50
    --quiet|-q            Make the script quiet about non existent instance names
51
    --quiet|-q            Make the script quiet about non existent instance names
51
                          (useful for calling from another scripts).
52
                          (useful for calling from another scripts).
52
    --help|-h             Display this help message
53
    --help|-h             Display this help message
Lines 138-143 restart_indexer() Link Here
138
    fi
139
    fi
139
}
140
}
140
141
142
indexer_status()
143
{
144
    local name=$1
145
146
    if is_indexer_running ${name}; then
147
        log_daemon_msg "Indexer running for ${name}"
148
        log_end_msg 0
149
    else
150
        log_daemon_msg "Indexer not running for ${name}"
151
        log_end_msg 3
152
    fi
153
}
154
141
set_action()
155
set_action()
142
{
156
{
143
    if [ "$op" = "" ]; then
157
    if [ "$op" = "" ]; then
Lines 168-173 while [ $# -gt 0 ]; do Link Here
168
        --restart)
182
        --restart)
169
            set_action "restart"
183
            set_action "restart"
170
            shift ;;
184
            shift ;;
185
        --status)
186
            set_action "status"
187
            shift ;;
171
        -*)
188
        -*)
172
            die "Error: invalid option switch ($1)" ;;
189
            die "Error: invalid option switch ($1)" ;;
173
        *)
190
        *)
Lines 221-226 if [ $# -gt 0 ]; then Link Here
221
                "restart")
238
                "restart")
222
                    restart_indexer $name
239
                    restart_indexer $name
223
                    ;;
240
                    ;;
241
                "status")
242
                    indexer_status $name
224
            esac
243
            esac
225
244
226
        else
245
        else
227
- 

Return to bug 23400