|
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 |
- |
|
|