//
// Copyright (c) 1987-2022 by the citadel.org team
//
-// This program is open source software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License version 3.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
+// This program is open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
#define SHOW_ME_VAPPEND_PRINTF
#include <stdlib.h>
" 2. External LDAP - RFC 2307 POSIX schema\n"
" 3. External LDAP - MS Active Directory schema\n"
"\n"
-"For help: http://www.citadel.org/doku.php/faq:installation:authmodes\n"
+"For help: http://www.citadel.org/authmodes.html\n"
"\n"
"ANSWER \"0\" UNLESS YOU COMPLETELY UNDERSTAND THIS OPTION.\n");
"If you entered a Bind DN in the previous question, you must now enter\n"
"the password associated with that account. Otherwise, you can leave this\n"
"blank.\n");
+}
-#if 0
-// Debug loading of locales... Strace does a better job though.
- printf("Message catalog directory: %s\n", bindtextdomain("citadel-setup", LOCALEDIR"/locale"));
- printf("Text domain: %s\n", textdomain("citadel-setup"));
- printf("Text domain Charset: %s\n", bind_textdomain_codeset("citadel-setup","UTF8"));
- {
- int i;
- for (i = 0; i < eMaxQuestions; i++)
- printf("%s - %s\n", setup_titles[i], _(setup_titles[i]));
- exit(0);
- }
-#endif
+
+void cls(void) {
+ printf("\033[2J\033[H\033[44m\033[1m\033[K\n");
+ printf(" %s \033[K\n", program_title);
+ printf("\033[K\n");
+ printf("\033[0m\n");
}
void title(const char *text) {
- printf("\n\033[1m\033[32m<\033[33m%s\033[32m>\033[0m\n", text);
+ cls();
+ printf("\033[1m\033[32m<\033[33m%s\033[32m>\033[0m\n", text);
}
char buf[SIZ];
do {
- printf("%s\n%s [%s] --> ", question, _("Yes/No"), ( default_value ? _("Yes") : _("No") ));
+ printf("\033[31m\033[32m%s\n%s [\033[33m%s\033[32m]\033[0m --> ", question, _("Yes/No"), ( default_value ? _("Yes") : _("No") ));
if (fgets(buf, sizeof buf, stdin)) {
answer = tolower(buf[0]);
if ((buf[0]==0) || (buf[0]==13) || (buf[0]==10)) {
void important_message(const char *title, const char *msgtext) {
char buf[SIZ];
- printf("\n%s\n%s\n\n", title, msgtext);
+ cls();
+ printf("%s\n%s\n\n", title, msgtext);
printf("%s", _("Press return to continue..."));
if (fgets(buf, sizeof buf, stdin)) {
;
long i = 0;
if (curr == 0) {
+ cls();
printf("%s\n", text);
printf("\033[1m\033[33m[\033[32m............................................................................\033[33m]\033[0m\r");
}
);
fclose(fp);
- // Now try to restart the service. This will not have the intended effect on Solaris, but who uses Solaris anymore?
+ // Now try to restart the service. (This only works on systemd; others will need to restart it manually.)
rv = system("systemctl restart xinetd >/dev/null 2>&1");
if (rv != 0) {
rv = system("service xinetd restart >/dev/null 2>&1");
}
-void set_str_val(int msgpos, char *Target, char *DefValue)
-{
+void set_str_val(int msgpos, char *Target, char *DefValue) {
strprompt(setup_titles[msgpos],
setup_text[msgpos],
Target,
char *activity = NULL;
// Keep a mild groove on
- program_title = _("Citadel setup program");
+ program_title = _("Citadel Server setup");
// set an invalid setup type
setup_type = (-1);
while (serv_gets(buf), strcmp(buf, "000")) {
if (a == 5) {
if (atoi(buf) != REV_LEVEL) {
- display_error("%s\n",
- _("Your setup program and Citadel server are from different versions.")
- );
+ display_error("%s\n", _("Your setup program and Citadel server are from different versions."));
exit(4);
}
}