Mon Nov 30 19:48:52 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* room_ops.c: added sort_msglist() to move and save operations
- * sendcommand.c: added
+ * sendcommand.c: added (also updated utils.txt, weekly, Makefile.in)
Sun Nov 29 23:57:39 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Fixed cmd_regi() to not display a second result code after xfer
whobbs: whobbs.o ipc_c_tcp.o tools.o $(SNPRINTF)
$(CC) whobbs.o ipc_c_tcp.o tools.o $(SNPRINTF) $(LDFLAGS) -o whobbs
-sendcommand: sendcommand.o ipc_c_tcp.o tools.o $(SNPRINTF)
- $(CC) sendcommand.o ipc_c_tcp.o tools.o $(SNPRINTF) $(LDFLAGS) \
- -o sendcommand
- chmod 700 sendcommand
+sendcommand: sendcommand.o ipc_c_tcp.o tools.o config.o $(SNPRINTF)
+ $(CC) sendcommand.o ipc_c_tcp.o tools.o config.o \
+ $(SNPRINTF) $(LDFLAGS) -o sendcommand
userlist: userlist.o ipc_c_tcp.o tools.o $(SNPRINTF)
$(CC) userlist.o ipc_c_tcp.o tools.o \
`find help messages network -type f | grep -v CVS`; do \
$(INSTALL_DATA) $$i $(prefix)/$$i; \
done
+ chmod 700 $(prefix)/sendcommand
install-doc:
./mkinstalldirs $(prefix)/techdoc
Citadel/UX v5.50 showstoppers list
----------------------------------
-* Figure out a way to auto-launch expire functions (and other functions)
Other things that might be nice to take care of:
------------------------------------------------
home_specified = 1;
}
else {
+ if (strlen(cmd)>0) strcat(cmd, " ");
strcat(cmd, argv[a]);
}
}
serv_gets(buf);
fprintf(stderr, "%s\n", buf);
+ if (buf[0]=='1') {
+ while (serv_gets(buf), strcmp(buf, "000")) {
+ printf("%s\n", buf);
+ }
+ }
+ else if (buf[0]=='4') {
+ do {
+ if (fgets(buf, 255, stdin)==NULL) strcpy(buf, "000");
+ if (strcmp(buf, "000")) serv_puts(buf);
+ } while (strcmp(buf, "000"));
+ }
+
fprintf(stderr, "sendcommand: processing ended.\n");
cleanup(0);
return 0;
OVERVIEW
The following utilities will be discussed in this document:
- aidepost Post standard input to the Aide> room. NOTE: called by chat.c
- whobbs Who is on the system (connected to the server, actually.)
- stats Print the calling statistics & graph.
- msgform Format a binary message to the screen (stdin or in a file)
- userlist Print the userlist.
- readlog Read the caller log
+ aidepost Post standard input to the Aide> room
+ whobbs Who is on the system
+ stats Print the calling statistics & graph
+ msgform Format a binary message to the screen (stdin or in a file)
+ userlist Print the userlist
+ readlog Read the caller log
+ sendcommand Send a server command
It is up to you to decide which utilities should be made accessible only
to sysops. It is important that you set the file permissions correctly. All
at what baud rate, as well as logins, proper logouts, loss of carrier (SIGHUP),
bad password attempts, and new user logins.
+
+ SENDCOMMAND
+
+ sendcommand will interpret its arguments (except for "-hDIRNAME") as a
+server command, which is sent to the server. Commands which require textual
+input will read it from stdin. Commands which generate textual output will
+be sent to stdout.
+
+ This utility is intended to be used to enable Citadel server commands to be
+executed from shell scripts. Review the script called "weekly" which ships
+with the Citadel distribution for an example of how this can be used.
+ NOTE: be sure that this utility is not world-executable. It connects to the
+server in privileged mode, and therefore could present a security hole if not
+properly restricted.
+
+
--------------------------------------------------------------------------
That should cover all of the included utilities. Comments, suggestions,