500 |
"Start or stop method not defined for the service"); |
"Start or stop method not defined for the service"); |
501 |
goto quit; |
goto quit; |
502 |
} |
} |
503 |
|
} else if(IS(action, "monitor")) { |
504 |
|
LOCK(s->mutex) |
505 |
|
check_service(name, action); |
506 |
|
END_LOCK; |
507 |
|
} else if(IS(action, "unmonitor")) { |
508 |
|
LOCK(s->mutex) |
509 |
|
check_service(name, action); |
510 |
|
END_LOCK; |
511 |
} else if(IS(action, "status")) { |
} else if(IS(action, "status")) { |
512 |
print_status(s, res); |
print_status(s, res); |
513 |
goto quit; |
goto quit; |
1511 |
out_print(res, |
out_print(res, |
1512 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
1513 |
"<input type=hidden value='start' name=action>" |
"<input type=hidden value='start' name=action>" |
1514 |
"<input type=submit value='Start program' style='font-size: " |
"<input type=submit value='Start service' style='font-size: " |
1515 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
1516 |
/* Stop program */ |
/* Stop program */ |
1517 |
if(s->stop) |
if(s->stop) |
1518 |
out_print(res, |
out_print(res, |
1519 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
1520 |
"<input type=hidden value='stop' name=action>" |
"<input type=hidden value='stop' name=action>" |
1521 |
"<input type=submit value='Stop program' style='font-size: " |
"<input type=submit value='Stop service' style='font-size: " |
1522 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
1523 |
if(s->start && s->stop) |
if(s->start && s->stop) |
1524 |
out_print(res, |
out_print(res, |
1525 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
1526 |
"<input type=hidden value='restart' name=action>" |
"<input type=hidden value='restart' name=action>" |
1527 |
"<input type=submit value='Restart program' style='font-size: " |
"<input type=submit value='Restart service' style='font-size: " |
1528 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
1529 |
out_print(res, "</tr></table>"); |
out_print(res, |
1530 |
|
"<td><form method=GET action=/%s>" |
1531 |
|
"<input type=hidden value='monitor' name=action>" |
1532 |
|
"<input type=submit value='Enable monitoring' style='font-size: " |
1533 |
|
"12pt'></font></form></td>" |
1534 |
|
"<td><form method=GET action=/%s>" |
1535 |
|
"<input type=hidden value='unmonitor' name=action>" |
1536 |
|
"<input type=submit value='Disable monitoring' style='font-size: " |
1537 |
|
"12pt'></font></form></td></tr></table>", s->name, s->name); |
1538 |
|
|
1539 |
} |
} |
1540 |
|
|
1719 |
out_print(res, |
out_print(res, |
1720 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
1721 |
"<input type=hidden value='start' name=action>" |
"<input type=hidden value='start' name=action>" |
1722 |
"<input type=submit value='Start program' style='font-size: " |
"<input type=submit value='Start service' style='font-size: " |
1723 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
1724 |
/* Stop program */ |
/* Stop program */ |
1725 |
if(s->stop) |
if(s->stop) |
1726 |
out_print(res, |
out_print(res, |
1727 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
1728 |
"<input type=hidden value='stop' name=action>" |
"<input type=hidden value='stop' name=action>" |
1729 |
"<input type=submit value='Stop program' style='font-size: " |
"<input type=submit value='Stop service' style='font-size: " |
1730 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
1731 |
if(s->start && s->stop) |
if(s->start && s->stop) |
1732 |
out_print(res, |
out_print(res, |
1733 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
1734 |
"<input type=hidden value='restart' name=action>" |
"<input type=hidden value='restart' name=action>" |
1735 |
"<input type=submit value='Restart program' style='font-size: " |
"<input type=submit value='Restart service' style='font-size: " |
1736 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
1737 |
out_print(res, "</tr></table>"); |
out_print(res, |
1738 |
|
"<td><form method=GET action=/%s>" |
1739 |
|
"<input type=hidden value='monitor' name=action>" |
1740 |
|
"<input type=submit value='Enable monitoring' style='font-size: " |
1741 |
|
"12pt'></font></form></td>" |
1742 |
|
"<td><form method=GET action=/%s>" |
1743 |
|
"<input type=hidden value='unmonitor' name=action>" |
1744 |
|
"<input type=submit value='Disable monitoring' style='font-size: " |
1745 |
|
"12pt'></font></form></td></tr></table>", s->name, s->name); |
1746 |
|
|
1747 |
} |
} |
1748 |
|
|
1949 |
out_print(res, |
out_print(res, |
1950 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
1951 |
"<input type=hidden value='start' name=action>" |
"<input type=hidden value='start' name=action>" |
1952 |
"<input type=submit value='Start program' style='font-size: " |
"<input type=submit value='Start service' style='font-size: " |
1953 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
1954 |
/* Stop program */ |
/* Stop program */ |
1955 |
if(s->stop) |
if(s->stop) |
1956 |
out_print(res, |
out_print(res, |
1957 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
1958 |
"<input type=hidden value='stop' name=action>" |
"<input type=hidden value='stop' name=action>" |
1959 |
"<input type=submit value='Stop program' style='font-size: " |
"<input type=submit value='Stop service' style='font-size: " |
1960 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
1961 |
if(s->start && s->stop) |
if(s->start && s->stop) |
1962 |
out_print(res, |
out_print(res, |
1963 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
1964 |
"<input type=hidden value='restart' name=action>" |
"<input type=hidden value='restart' name=action>" |
1965 |
"<input type=submit value='Restart program' style='font-size: " |
"<input type=submit value='Restart service' style='font-size: " |
1966 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
1967 |
out_print(res, "</tr></table>"); |
out_print(res, |
1968 |
|
"<td><form method=GET action=/%s>" |
1969 |
|
"<input type=hidden value='monitor' name=action>" |
1970 |
|
"<input type=submit value='Enable monitoring' style='font-size: " |
1971 |
|
"12pt'></font></form></td>" |
1972 |
|
"<td><form method=GET action=/%s>" |
1973 |
|
"<input type=hidden value='unmonitor' name=action>" |
1974 |
|
"<input type=submit value='Disable monitoring' style='font-size: " |
1975 |
|
"12pt'></font></form></td></tr></table>", s->name, s->name); |
1976 |
|
|
1977 |
} |
} |
1978 |
|
|
2240 |
out_print(res, |
out_print(res, |
2241 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
2242 |
"<input type=hidden value='start' name=action>" |
"<input type=hidden value='start' name=action>" |
2243 |
"<input type=submit value='Start program' style='font-size: " |
"<input type=submit value='Start service' style='font-size: " |
2244 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
2245 |
/* Stop program */ |
/* Stop program */ |
2246 |
if(s->stop) |
if(s->stop) |
2247 |
out_print(res, |
out_print(res, |
2248 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
2249 |
"<input type=hidden value='stop' name=action>" |
"<input type=hidden value='stop' name=action>" |
2250 |
"<input type=submit value='Stop program' style='font-size: " |
"<input type=submit value='Stop service' style='font-size: " |
2251 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
2252 |
if(s->start && s->stop) |
if(s->start && s->stop) |
2253 |
out_print(res, |
out_print(res, |
2254 |
"<td><form method=GET action=/%s>" |
"<td><form method=GET action=/%s>" |
2255 |
"<input type=hidden value='restart' name=action>" |
"<input type=hidden value='restart' name=action>" |
2256 |
"<input type=submit value='Restart program' style='font-size: " |
"<input type=submit value='Restart service' style='font-size: " |
2257 |
"12pt'></font></form></td>", s->name); |
"12pt'></font></form></td>", s->name); |
2258 |
out_print(res, "</tr></table>"); |
out_print(res, |
2259 |
|
"<td><form method=GET action=/%s>" |
2260 |
|
"<input type=hidden value='monitor' name=action>" |
2261 |
|
"<input type=submit value='Enable monitoring' style='font-size: " |
2262 |
|
"12pt'></font></form></td>" |
2263 |
|
"<td><form method=GET action=/%s>" |
2264 |
|
"<input type=hidden value='unmonitor' name=action>" |
2265 |
|
"<input type=submit value='Disable monitoring' style='font-size: " |
2266 |
|
"12pt'></font></form></td></tr></table>", s->name, s->name); |
2267 |
|
|
2268 |
} |
} |
2269 |
|
|