2 * (c) 2009 by Art Cancro and citadel.org
3 * This program is released under the terms of the GNU General Public License v3.
10 #include <readline/readline.h>
12 int main(int argc, char **argv)
16 int server_socket = 0;
19 printf("\nCitadel administration shell v" PACKAGE_VERSION "\n");
20 printf("(c) 2009 citadel.org GPLv3\n");
22 printf("Attaching to server...\r");
24 server_socket = uds_connectsock("/root/ctdl/trunk/citadel/citadel.socket");
25 if (server_socket < 0) {
30 sock_getln(server_socket, buf, sizeof buf);
33 while (cmd = readline(prompt)) {
35 if ((cmd) && (*cmd)) {
39 printf("\nHaha, you said: '%s'\n\n", cmd);
44 sock_puts(server_socket, "QUIT");
45 sock_getln(server_socket, buf, sizeof buf);