mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-18 18:14:20 +01:00
Remove the --signal-list option
This commit is contained in:
43
README.md
43
README.md
@@ -77,28 +77,27 @@ VERSION:
|
||||
1.3.3
|
||||
|
||||
OPTIONS:
|
||||
--port, -p Port to listen (default: 7681, use `0` for random port)
|
||||
--interface, -i Network interface to bind (eg: eth0), or UNIX domain socket path (eg: /var/run/ttyd.sock)
|
||||
--credential, -c Credential for Basic Authentication (format: username:password)
|
||||
--uid, -u User id to run with
|
||||
--gid, -g Group id to run with
|
||||
--signal, -s Signal to send to the command when exit it (default: SIGHUP)
|
||||
--signal-list Print a list of supported signals
|
||||
--reconnect, -r Time to reconnect for the client in seconds (default: 10)
|
||||
--readonly, -R Do not allow clients to write to the TTY
|
||||
--client-option, -t Send option to client (format: key=value), repeat to add more options
|
||||
--check-origin, -O Do not allow websocket connection from different origin
|
||||
--max-clients, -m Maximum clients to support (default: 0, no limit)
|
||||
--once, -o Accept only one client and exit on disconnection
|
||||
--browser, -B Open terminal with the default system browser
|
||||
--index, -I Custom index.html path
|
||||
--ssl, -S Enable SSL
|
||||
--ssl-cert, -C SSL certificate file path
|
||||
--ssl-key, -K SSL key file path
|
||||
--ssl-ca, -A SSL CA file path for client certificate verification
|
||||
--debug, -d Set log level (default: 7)
|
||||
--version, -v Print the version and exit
|
||||
--help, -h Print this text and exit
|
||||
-p, --port Port to listen (default: 7681, use `0` for random port)
|
||||
-i, --interface Network interface to bind (eg: eth0), or UNIX domain socket path (eg: /var/run/ttyd.sock)
|
||||
-c, --credential Credential for Basic Authentication (format: username:password)
|
||||
-u, --uid User id to run with
|
||||
-g, --gid Group id to run with
|
||||
-s, --signal Signal to send to the command when exit it (default: SIGHUP)
|
||||
-r, --reconnect Time to reconnect for the client in seconds (default: 10)
|
||||
-R, --readonly Do not allow clients to write to the TTY
|
||||
-t, --client-option Send option to client (format: key=value), repeat to add more options
|
||||
-O, --check-origin Do not allow websocket connection from different origin
|
||||
-m, --max-clients Maximum clients to support (default: 0, no limit)
|
||||
-o, --once Accept only one client and exit on disconnection
|
||||
-B, --browser Open terminal with the default system browser
|
||||
-I, --index Custom index.html path
|
||||
-S, --ssl Enable SSL
|
||||
-C, --ssl-cert SSL certificate file path
|
||||
-K, --ssl-key SSL key file path
|
||||
-A, --ssl-ca SSL CA file path for client certificate verification
|
||||
-d, --debug Set log level (default: 7)
|
||||
-v, --version Print the version and exit
|
||||
-h, --help Print this text and exit
|
||||
|
||||
Visit https://github.com/tsl0922/ttyd to get more information and report bugs.
|
||||
```
|
||||
|
||||
6
man/README.md
Normal file
6
man/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Building the man page
|
||||
|
||||
```bash
|
||||
go get github.com/cpuguy83/go-md2man
|
||||
go-md2man < ttyd.man.md > ttyd.1
|
||||
```
|
||||
@@ -52,10 +52,6 @@ Cross platform: macOS, Linux, FreeBSD/OpenBSD, OpenWrt/LEDE, Windows
|
||||
\-s, \-\-signal <signal string>
|
||||
Signal to send to the command when exit it (default: SIGHUP)
|
||||
|
||||
.PP
|
||||
\-\-signal\-list
|
||||
Print a list of supported signals
|
||||
|
||||
.PP
|
||||
\-r, \-\-reconnect <seconds>
|
||||
Time to reconnect for the client in seconds (default: 10)
|
||||
|
||||
@@ -36,9 +36,6 @@ ttyd 1 "September 2016" ttyd "User Manual"
|
||||
-s, --signal <signal string>
|
||||
Signal to send to the command when exit it (default: SIGHUP)
|
||||
|
||||
--signal-list
|
||||
Print a list of supported signals
|
||||
|
||||
-r, --reconnect <seconds>
|
||||
Time to reconnect for the client in seconds (default: 10)
|
||||
|
||||
|
||||
46
src/server.c
46
src/server.c
@@ -52,28 +52,27 @@ void print_help() {
|
||||
"VERSION:\n"
|
||||
" %s\n\n"
|
||||
"OPTIONS:\n"
|
||||
" --port, -p Port to listen (default: 7681, use `0` for random port)\n"
|
||||
" --interface, -i Network interface to bind (eg: eth0), or UNIX domain socket path (eg: /var/run/ttyd.sock)\n"
|
||||
" --credential, -c Credential for Basic Authentication (format: username:password)\n"
|
||||
" --uid, -u User id to run with\n"
|
||||
" --gid, -g Group id to run with\n"
|
||||
" --signal, -s Signal to send to the command when exit it (default: SIGHUP)\n"
|
||||
" --signal-list Print a list of supported signals\n"
|
||||
" --reconnect, -r Time to reconnect for the client in seconds (default: 10)\n"
|
||||
" --readonly, -R Do not allow clients to write to the TTY\n"
|
||||
" --client-option, -t Send option to client (format: key=value), repeat to add more options\n"
|
||||
" --check-origin, -O Do not allow websocket connection from different origin\n"
|
||||
" --max-clients, -m Maximum clients to support (default: 0, no limit)\n"
|
||||
" --once, -o Accept only one client and exit on disconnection\n"
|
||||
" --browser, -B Open terminal with the default system browser\n"
|
||||
" --index, -I Custom index.html path\n"
|
||||
" --ssl, -S Enable SSL\n"
|
||||
" --ssl-cert, -C SSL certificate file path\n"
|
||||
" --ssl-key, -K SSL key file path\n"
|
||||
" --ssl-ca, -A SSL CA file path for client certificate verification\n"
|
||||
" --debug, -d Set log level (default: 7)\n"
|
||||
" --version, -v Print the version and exit\n"
|
||||
" --help, -h Print this text and exit\n\n"
|
||||
" -p, --port Port to listen (default: 7681, use `0` for random port)\n"
|
||||
" -i, --interface Network interface to bind (eg: eth0), or UNIX domain socket path (eg: /var/run/ttyd.sock)\n"
|
||||
" -c, --credential Credential for Basic Authentication (format: username:password)\n"
|
||||
" -u, --uid User id to run with\n"
|
||||
" -g, --gid Group id to run with\n"
|
||||
" -s, --signal Signal to send to the command when exit it (default: SIGHUP)\n"
|
||||
" -r, --reconnect Time to reconnect for the client in seconds (default: 10)\n"
|
||||
" -R, --readonly Do not allow clients to write to the TTY\n"
|
||||
" -t, --client-option Send option to client (format: key=value), repeat to add more options\n"
|
||||
" -O, --check-origin Do not allow websocket connection from different origin\n"
|
||||
" -m, --max-clients Maximum clients to support (default: 0, no limit)\n"
|
||||
" -o, --once Accept only one client and exit on disconnection\n"
|
||||
" -B, --browser Open terminal with the default system browser\n"
|
||||
" -I, --index Custom index.html path\n"
|
||||
" -S, --ssl Enable SSL\n"
|
||||
" -C, --ssl-cert SSL certificate file path\n"
|
||||
" -K, --ssl-key SSL key file path\n"
|
||||
" -A, --ssl-ca SSL CA file path for client certificate verification\n"
|
||||
" -d, --debug Set log level (default: 7)\n"
|
||||
" -v, --version Print the version and exit\n"
|
||||
" -h, --help Print this text and exit\n\n"
|
||||
"Visit https://github.com/tsl0922/ttyd to get more information and report bugs.\n",
|
||||
TTYD_VERSION
|
||||
);
|
||||
@@ -235,9 +234,6 @@ main(int argc, char **argv) {
|
||||
int c;
|
||||
while ((c = getopt_long(start, argv, opt_string, options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 1:
|
||||
print_sig_list();
|
||||
exit(EXIT_SUCCESS);
|
||||
case 'h':
|
||||
print_help();
|
||||
return 0;
|
||||
|
||||
10
src/utils.c
10
src/utils.c
@@ -88,16 +88,6 @@ get_sig(const char *sig_name) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
void print_sig_list() {
|
||||
char name[30];
|
||||
for (int sig = 1; sig < NSIG; sig++) {
|
||||
if (sys_signame[sig] != NULL) {
|
||||
strcpy(name, sys_signame[sig]);
|
||||
printf("%2d) SIG%s (%s)\n", sig, uppercase(name), strsignal(sig));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
open_uri(char *uri) {
|
||||
#ifdef __APPLE__
|
||||
|
||||
@@ -25,10 +25,6 @@ get_sig_name(int sig, char *buf);
|
||||
int
|
||||
get_sig(const char *sig_name);
|
||||
|
||||
// print signal list
|
||||
void
|
||||
print_sig_list();
|
||||
|
||||
// Open uri with the default application of system
|
||||
int
|
||||
open_uri(char *uri);
|
||||
|
||||
Reference in New Issue
Block a user