4,19 → 4,8 |
* A daemon which waits on specified UDP port for special string |
* (password) and reboots the computer. |
* |
* Command line: rebootd [--version] [--help] [--interface IP] [--port PORT] [--config CONFIG_FILE] |
* Defaults are port 19 and config /etc/rebootd.conf. |
* Run "./rebootd --help" to see options and parameters. |
* |
* Config file looks like: |
* -------------------------- |
* interface=192.168.0.1 |
* port=19 |
* password="some password" |
* -------------------------- |
* |
* Usage example (from any other host): |
* echo -n "some password" | nc -uo host_to_rebot 19 |
* |
* Copyleft 2005 Anatoli Klassen |
* |
******************************************************************/ |
186,12 → 175,15 |
print_version(); |
printf("\nA daemon which waits on specified UDP port for special"); |
printf(" string (password) and reboots the computer.\n\n"); |
printf("Usage: %s [--interface IP] [--port PORT] [--config CONFIG_FILE]\n", argv[0]); |
printf("Usage: %s [--debug] [--interface IP] [--port PORT]\n", argv[0]); |
printf(" [--config CONFIG_FILE] [--pid FILE]\n"); |
printf(" or: %s --version\n", argv[0]); |
printf(" or: %s --help\n\n", argv[0]); |
printf("Defaults are port 19 and config /etc/rebootd.conf.\n\n"); |
printf("Defaults are port 19, all interfaces, config /etc/rebootd.conf and no PID file.\n"); |
printf("In debug mode do not reboot, just write to log.\n\n"); |
printf("Config file looks like:\n--------------------------\n"); |
printf("interface=192.168.0.1\nport=19\npassword=\"some password\"\n--------------------------\n\n"); |
printf("interface=192.168.0.1\nport=19\npassword=\"some password\"\n"); |
printf("pid=/var/run/rebootd.pid\n--------------------------\n\n"); |
printf("Then run from any other host:\necho -n \"some password\" | nc -uo host_to_rebot 19\n"); |
} |
|