Actualizează configurare cu model profesional bazat pe node-ase.ovh cu suport complet pentru underchat.org

This commit is contained in:
mihaiitdata 2026-02-13 00:46:21 +02:00
parent 554416c752
commit 6e41268b56
2 changed files with 392 additions and 145 deletions

View File

@ -104,21 +104,29 @@ configure_general() {
log_section "Setări de bază ale serverului" log_section "Setări de bază ale serverului"
# Domeniu rețea
NETWORK=$(read_input "Domeniu/Rețea (ex: underchat.org)" "underchat.org")
log_ok "Domeniu rețea: $NETWORK"
# Nume server # Nume server
while true; do while true; do
SERVER_NAME=$(read_input "Nume server (FQDN)" "localhost.localdomain") SERVER_NAME=$(read_input "Nume server (ex: ns1.${NETWORK})" "ns1.${NETWORK}")
if validate_hostname "$SERVER_NAME"; then if validate_hostname "$SERVER_NAME"; then
log_ok "Nume server valid: $SERVER_NAME" log_ok "Nume server valid: $SERVER_NAME"
break break
else else
log_err "Nume server invalid! Folosește format FQDN (ex: irc.example.com)" log_err "Nume server invalid! Folosește format FQDN (ex: ns1.example.com)"
fi fi
done done
# Descriere # Descriere
SERVER_DESC=$(read_input "Descriere server" "Nefarious IRCd Server") SERVER_DESC=$(read_input "Descriere server" "The ${NETWORK} Network")
log_ok "Descriere: $SERVER_DESC" log_ok "Descriere: $SERVER_DESC"
# Virtual host (IP local)
VHOST=$(read_input "Virtual Host / IP local" "127.0.0.1")
log_ok "Virtual Host: $VHOST"
# Numeric # Numeric
while true; do while true; do
NUMERIC=$(read_input "Numeric server (0-4095)" "1") NUMERIC=$(read_input "Numeric server (0-4095)" "1")
@ -208,15 +216,15 @@ configure_classes() {
configure_operators() { configure_operators() {
log_title "CONFIGURARE OPERATORI" log_title "CONFIGURARE OPERATORI"
log_section "Prim operator" log_section "Configurare Operator Principal"
OPER_NICK=$(read_input "Nick operator" "root") OPER_NAME=$(read_input "Nume operator" "AdminRoot")
log_ok "Nick: $OPER_NICK" log_ok "Nume: $OPER_NAME"
log_info "Pentru a genera parola, rulează:" log_info "Pentru a genera parola, rulează:"
echo -e "${CYAN} $PREFIX/bin/umkpasswd${NC}" echo -e "${CYAN} $PREFIX/bin/umkpasswd${NC}"
OPER_PASS=$(read_input "Hash bcrypt parola operator" "") OPER_PASS=$(read_input "Hash parola operator (SMD5/bcrypt)" "")
if [ -z "$OPER_PASS" ]; then if [ -z "$OPER_PASS" ]; then
log_err "Parola necesară! Generează cu umkpasswd" log_err "Parola necesară! Generează cu umkpasswd"
@ -224,8 +232,13 @@ configure_operators() {
log_info "Se folosește parola implicită pentru testing" log_info "Se folosește parola implicită pentru testing"
fi fi
OPER_HOST=$(read_input "Host permis pentru operator" "127.0.0.1") OPER_HOST=$(read_input "Host permis pentru operator" "*@*")
log_ok "Host: $OPER_HOST" log_ok "Host: $OPER_HOST"
# Oper options
read -p "Is this an admin operator? (y/n) [y]: " -n 1 IS_ADMIN
IS_ADMIN=${IS_ADMIN:-y}
echo ""
} }
# Etapa 6: Setări avansate # Etapa 6: Setări avansate
@ -263,12 +276,14 @@ generate_config_file() {
AUTH_FEATURE=$([ "$AUTH_ENABLED" = "y" ] && echo "yes" || echo "no") AUTH_FEATURE=$([ "$AUTH_ENABLED" = "y" ] && echo "yes" || echo "no")
PERSIST_FEATURE=$([ "$PERSIST_CHANS" = "y" ] && echo "yes" || echo "no") PERSIST_FEATURE=$([ "$PERSIST_CHANS" = "y" ] && echo "yes" || echo "no")
SWHOIS_FEATURE=$([ "$SWHOIS_ENABLED" = "y" ] && echo "yes" || echo "no") SWHOIS_FEATURE=$([ "$SWHOIS_ENABLED" = "y" ] && echo "yes" || echo "no")
IS_ADMIN_OPER=$([ "$IS_ADMIN" = "y" ] && echo "yes" || echo "no")
cat > "$CONFIG_FILE" << EOFCONFIG cat > "$CONFIG_FILE" << EOFCONFIG
# ============================================================================ # ============================================================================
# Fișier de configurare Nefarious IRCd # Fișier de configurare Nefarious IRCd
# Generat automat la: $(date) # Generat automat la: $(date)
# Script: configure.sh # Script: configure-interactive.sh
# Model: Professional IRC Server
# ============================================================================ # ============================================================================
# ============================================================================ # ============================================================================
@ -276,90 +291,174 @@ generate_config_file() {
# ============================================================================ # ============================================================================
General { General {
name = "$SERVER_NAME"; name = "$SERVER_NAME";
vhost = "127.0.0.1";
description = "$SERVER_DESC"; description = "$SERVER_DESC";
numeric = $NUMERIC; numeric = $NUMERIC;
logfile = "$PREFIX/log/ircd.log"; dns server = "8.8.8.8";
motd = "$PREFIX/etc/ircd.motd"; dns server = "1.1.1.1";
opermotd = "$PREFIX/etc/ircd.opermotd";
}; };
# ============================================================================ # ============================================================================
# SECȚIUNE: ADMIN # SECȚIUNE: ADMIN
# ============================================================================ # ============================================================================
Admin { Admin {
location = "$ADMIN_LOCATION"; Location = "The $SERVER_NAME World";
contact = "$ADMIN_EMAIL"; Location = "$ADMIN_LOCATION";
contact = "$ADMIN_INFO"; Contact = "$ADMIN_EMAIL";
Contact = "$ADMIN_INFO";
}; };
# ============================================================================ # ============================================================================
# SECȚIUNE: PORTURI # SECȚIUNE: CLASE DE CONEXIUNI
# ============================================================================ # ============================================================================
# Port standard pentru clienți
Port {
port = $PORT1;
mask = 0.0.0.0;
};
# Port SSL/TLS
Port {
port = $PORT2;
mask = 0.0.0.0;
tls = yes;
};
# Port server-to-server
Port {
port = $SERVER_PORT;
mask = 0.0.0.0;
};
# ============================================================================
# SECȚIUNE: CLASE
# ============================================================================
Class { Class {
name = "clients"; name = "Server";
pingfreq = $PINGFREQ; pingfreq = 1 minutes 30 seconds;
connectfreq = 60; connectfreq = 5 minutes;
maxlinks = $MAXLINKS; maxlinks = 1;
sendq = 9000000;
};
Class {
name = "Local";
pingfreq = $PINGFREQ seconds;
sendq = $SENDQ; sendq = $SENDQ;
maxlinks = $MAXLINKS;
usermode = "+iw";
}; };
Class { Class {
name = "servers"; name = "Other";
pingfreq = 60; pingfreq = $PINGFREQ seconds;
connectfreq = 300; sendq = $SENDQ;
maxlinks = 10; maxlinks = $MAXLINKS;
sendq = 1000000; usermode = "+ix";
};
Class {
name = "Opers";
pingfreq = $PINGFREQ seconds;
sendq = $SENDQ;
maxlinks = 20;
local = no;
freeform = yes;
mode_lchan = yes;
deop_lchan = yes;
walk_lchan = yes;
show_invis = yes;
see_chan = yes;
list_chan = yes;
usermode = "+W";
remove = yes;
}; };
# ============================================================================ # ============================================================================
# SECȚIUNE: CLIENT # SECȚIUNE: CLIENT
# ============================================================================ # ============================================================================
Client { Client {
class = "clients"; host = "*@*";
ip = "*@*";
class = "Other";
maxlinks = $MAXLINKS; maxlinks = $MAXLINKS;
}; };
# ============================================================================ # ============================================================================
# SECȚIUNE: OPERATOR # SECȚIUNE: PORTURI
# ============================================================================ # ============================================================================
Operator {
nick = "$OPER_NICK"; # Port server-to-server
password = "$OPER_PASS"; Port {
privileges = "+all"; vhost = "127.0.0.1" $SERVER_PORT;
host = "$OPER_HOST"; server = yes;
hidden = yes;
};
# Port standard pentru clienți
Port {
vhost = "127.0.0.1" $PORT1;
hidden = yes;
};
# Port SSL/TLS pentru clienți
Port {
vhost = "127.0.0.1" $PORT2;
ssl = yes;
hidden = yes;
}; };
# ============================================================================ # ============================================================================
# SECȚIUNE: CARACTERISTICI (Features) # SECȚIUNE: OPERATORI
# ============================================================================ # ============================================================================
Feature {
AUTH = "$AUTH_FEATURE"; Operator {
PERSIST_CHANS = "$PERSIST_FEATURE"; name = "$OPER_NAME";
IDLETIME = $IDLETIME; password = "$OPER_PASS";
SWHOIS = "$SWHOIS_FEATURE"; host = "$OPER_HOST";
LOG_FACILITY = "LOG_USER"; class = "Opers";
admin = $IS_ADMIN_OPER;
hide_oper = no;
hide_channels = no;
};
# ============================================================================
# SECȚIUNE: JUPE - Nick-uri rezervate
# ============================================================================
Jupe {
nick = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
nick = "StatServ,NoteServ";
nick = "ChanServ,ChanSaver";
nick = "NickServ,NickSaver";
};
# ============================================================================
# SECȚIUNE: FEATURE - Caracteristici
# ============================================================================
features {
"NETWORK" = "UnderchatNetwork";
"DOMAINNAME" = "$SERVER_NAME";
"LOG" = "SYSTEM" "FILE" "$PREFIX/log/ircd.log";
"LOG" = "SYSTEM" "LEVEL" "CRIT";
"HUB" = "TRUE";
"RELIABLE_CLOCK" = "FALSE";
"WALLOPS_OPER_ONLY" = "TRUE";
"NODNS" = "FALSE";
"CLIENT_FLOOD" = "1024";
"BUFFERPOOL" = "27000000";
"HOST_HIDING" = "TRUE";
"HIDDEN_HOST" = "users.underchat.org";
"HIDDEN_IP" = "127.0.0.1";
"MAXCHANNELSPERUSER" = "60";
"CHANNELLEN" = "200";
"MAXBANS" = "50";
"NICKLEN" = "12";
"NICKNAMEHISTORYLENGTH" = "800";
"HANGONGOODLINK" = "300";
"HANGONRETRYDELAY" = "10";
"CONNECTTIMEOUT" = "90";
"PINGFREQUENCY" = "$PINGFREQ";
"CONNECTFREQUENCY" = "600";
"MPATH" = "$PREFIX/etc/ircd.motd";
"PPATH" = "$PREFIX/var/ircd.pid";
"HIS_SERVERNAME" = "*.underchat.org";
"HIS_SERVERINFO" = "The UnderchatNetwork World";
"CHECK" = "TRUE";
"SETHOST" = "TRUE";
"NETWORK_REHASH" = "TRUE";
"HALFOPS" = "TRUE";
}; };
EOFCONFIG EOFCONFIG

View File

@ -207,6 +207,8 @@ generate_config() {
local server_numeric="${4:-1}" local server_numeric="${4:-1}"
local admin_location="${5:-Romania}" local admin_location="${5:-Romania}"
local admin_contact="${6:-admin@underchat.ro}" local admin_contact="${6:-admin@underchat.ro}"
local vhost="${7:-127.0.0.1}"
local network="${8:-underchat.org}"
log_info "Generare fișier de configurare: $config_file" log_info "Generare fișier de configurare: $config_file"
@ -216,139 +218,275 @@ generate_config() {
# Fișier de configurare pentru Nefarious IRCd # Fișier de configurare pentru Nefarious IRCd
# Generat automat în data: 2026 # Generat automat în data: 2026
# Limba: Română # Limba: Română
# Model: Node-Ase.ovh Professional IRC Server
# ============================================================================ # ============================================================================
# BLOC GENERAL - Setările principale ale serverului # SECȚIUNE: GENERAL
# ============================================================================ # ============================================================================
General { General {
# Numele serverului (trebuie să fie unic în rețea) # Numele serverului (trebuie unic în rețea)
name = "EOFCONFIG_NAME"; name = "EOFCONFIG_NAME";
# Virtual Host - IP pe care ascultă
vhost = "EOFCONFIG_VHOST";
# Descrierea serverului # Descrierea serverului
description = "EOFCONFIG_DESC"; description = "EOFCONFIG_DESC";
# Numeric-ul serverului (0-4095, trebuie unic în rețea) # Numeric-ul serverului (0-4095, trebuie unic în rețea)
numeric = EOFCONFIG_NUMERIC; numeric = EOFCONFIG_NUMERIC;
# Calea către fișierul de log # Servere DNS pentru rezolvare domenii
logfile = "EOFCONFIG_PREFIX/log/ircd.log"; dns server = "8.8.8.8";
dns server = "1.1.1.1";
# Calea către motd (Message of the Day)
motd = "EOFCONFIG_PREFIX/etc/ircd.motd";
# Calea către opmotd (Message for operators)
opermotd = "EOFCONFIG_PREFIX/etc/ircd.opermotd";
}; };
# ============================================================================ # ============================================================================
# BLOC ADMIN - Informații administrator # SECȚIUNE: ADMIN
# ============================================================================ # ============================================================================
Admin { Admin {
# Locație # Locații (maxim 2)
location = "EOFCONFIG_ADMIN_LOC"; Location = "EOFCONFIG_NETWORK World";
Location = "EOFCONFIG_ADMIN_LOC";
# Contact # Contacti
contact = "EOFCONFIG_ADMIN_CONTACT"; Contact = "EOFCONFIG_ADMIN_CONTACT";
}; };
# ============================================================================ # ============================================================================
# BLOC PORT - Porturile de ascultare # SECȚIUNE: CLASE DE CONEXIUNI
# ============================================================================ # ============================================================================
Port {
# Port pentru clienți normali (implicit 6667)
port = 6667;
mask = 0.0.0.0;
};
# Port pentru SSL # Clasă pentru servere principale (hub)
Port {
port = 6697;
mask = 0.0.0.0;
tls = yes;
};
# ============================================================================
# BLOC ULINED - Servere de rețea (pentru testing local)
# ============================================================================
Uline {
# Nume server
server = "services.underchat.ro";
};
# ============================================================================
# BLOC CLASS - Clase de conexiuni
# ============================================================================
Class { Class {
name = "clients"; name = "Server";
pingfreq = 120; pingfreq = 1 minutes 30 seconds;
connectfreq = 60; connectfreq = 5 minutes;
maxlinks = 1;
sendq = 9000000;
};
# Clasă pentru clienți obișnuiți
Class {
name = "Local";
pingfreq = 1 minutes 30 seconds;
sendq = 160000;
maxlinks = 100; maxlinks = 100;
sendq = 40000; usermode = "+iw";
}; };
# Clasă pentru clienți normali (implicit)
Class { Class {
name = "servers"; name = "Other";
pingfreq = 60; pingfreq = 1 minutes 30 seconds;
connectfreq = 300; sendq = 160000;
maxlinks = 10; maxlinks = 2048;
sendq = 1000000; usermode = "+ix";
};
# Clasă pentru operatori
Class {
name = "Opers";
pingfreq = 1 minutes 30 seconds;
sendq = 160000;
maxlinks = 20;
local = no;
freeform = yes;
mode_lchan = yes;
deop_lchan = yes;
walk_lchan = yes;
show_invis = yes;
see_chan = yes;
list_chan = yes;
usermode = "+W";
remove = yes;
}; };
# ============================================================================ # ============================================================================
# BLOC CLIENT - Restricții pentru clienți # SECȚIUNE: CLIENT - Restricții pentru conexiuni
# ============================================================================ # ============================================================================
# Configurare implicită pentru toți clienții
Client { Client {
class = "clients"; host = "*@*";
maxlinks = 10; ip = "*@*";
class = "Other";
maxlinks = 6;
}; };
# ============================================================================ # ============================================================================
# BLOC CONNECT - Configurare conectări la alte servere # SECȚIUNE: JUPED NICKS - Nick-uri rezervate
# ============================================================================ # ============================================================================
# Exemplu: Connect la un alt server Jupe {
# Connect { # Litere și caractere speciale
# name = "other.server.com"; nick = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
# host = "192.168.1.100";
# port = 6667; # Servicii de rețea
# maxlinks = 1; nick = "StatServ,NoteServ";
# class = "servers"; nick = "ChanServ,ChanSaver";
# password = "linker_password"; nick = "NickServ,NickSaver";
};
# ============================================================================
# SECȚIUNE: PORTURI
# ============================================================================
# Port pentru server-to-server
Port {
vhost = "EOFCONFIG_VHOST" 4400;
server = yes;
hidden = yes;
};
# Port standard pentru clienți
Port {
vhost = "EOFCONFIG_VHOST" 6667;
hidden = yes;
};
# Port SSL/TLS pentru clienți (opțional)
# Port {
# vhost = "EOFCONFIG_VHOST" 6697;
# ssl = yes;
# hidden = yes;
# }; # };
# ============================================================================ # ============================================================================
# BLOC OPERATOR - Configurare operatori # SECȚIUNE: OPERATORI
# ============================================================================ # ============================================================================
Operator { Operator {
# Nickname-ul operatorului # Nickname-ul operatorului
nick = "root"; name = "AdminRoot";
# Password-ul operatorului (hash bcrypt) # Password-ul operatorului (hash MD5/bcrypt/SMD5)
# Generează cu: ./ircd/umkpasswd # Generează cu: ./ircd/umkpasswd
password = "$2a$04$NTy1i.X/8pXekNBNbMRlOu1JAjIiMfPGIe1sZf0Xqq.2jzqPMfN/G"; password = "$2a$04$NTy1i.X/8pXekNBNbMRlOu1JAjIiMfPGIe1sZf0Xqq.2jzqPMfN/G";
# Permisiuni operator (vezi doc/opercmds.html) # Host-uri permise pentru operator (*)
privileges = "+all"; host = "*@*";
# Host-uri permise pentru operator # Clasă
host = "127.0.0.1"; class = "Opers";
host = "localhost";
# Permisiuni
# hide_oper = yes;
# hide_channels = yes;
# whois_notice = yes;
admin = yes;
}; };
# ============================================================================ # ============================================================================
# BLOC FEATURE - Caracteristici dinamice # SECȚIUNE: CONNECT - Legări cu alte servere
# ============================================================================ # ============================================================================
Feature {
# Activează autenticarea
AUTH = "yes";
# Activează channelurile persistente # Exemplu: Connect la un server hub
PERSIST_CHANS = "no"; # Connect {
# name = "hub.EOFCONFIG_NETWORK";
# host = "192.168.1.100";
# password = "hub_password";
# port = 4400;
# class = "Server";
# autoconnect = yes;
# hub;
# };
# Timp maxim de inactivitate (secunde) # ============================================================================
IDLETIME = 0; # SECȚIUNE: UWORLD - Servere de servicii
# ============================================================================
# Activează SWHOIs # UWorld {
SWHOIS = "yes"; # name = "services.EOFCONFIG_NETWORK";
# };
# ============================================================================
# SECȚIUNE: FEATURE - Caracteristici și setări
# ============================================================================
features {
# Network details
"NETWORK" = "EOFCONFIG_NETWORK";
"DOMAINNAME" = "EOFCONFIG_NETWORK";
# Logging
"LOG" = "SYSTEM" "FILE" "EOFCONFIG_PREFIX/log/ircd.log";
"LOG" = "SYSTEM" "LEVEL" "CRIT";
# Server settings
"HUB" = "TRUE";
"RELIABLE_CLOCK" = "FALSE";
"WALLOPS_OPER_ONLY" = "TRUE";
"NODNS" = "FALSE";
"NOIDENT" = "FALSE";
# Client settings
"CLIENT_FLOOD" = "1024";
"BUFFERPOOL" = "27000000";
"DEFAULTMAXSENDQLENGTH" = "40000";
# Host hiding
"HOST_HIDING" = "TRUE";
"HIDDEN_HOST" = "users.EOFCONFIG_NETWORK";
"HIDDEN_IP" = "127.0.0.1";
# Channels
"MAXCHANNELSPERUSER" = "60";
"CHANNELLEN" = "200";
"MAXBANS" = "50";
# Nick settings
"NICKLEN" = "12";
"NICKNAMEHISTORYLENGTH" = "800";
# Timing
"HANGONGOODLINK" = "300";
"HANGONRETRYDELAY" = "10";
"CONNECTTIMEOUT" = "90";
"PINGFREQUENCY" = "120";
"CONNECTFREQUENCY" = "600";
# Welcome messages
"MPATH" = "EOFCONFIG_PREFIX/etc/ircd.motd";
"RPATH" = "EOFCONFIG_PREFIX/etc/remote.motd";
"PPATH" = "EOFCONFIG_PREFIX/var/ircd.pid";
# Stats visibility
"HIS_STATS_u" = "FALSE";
"HIS_STATS_U" = "TRUE";
# Whois privacy
"HIS_WHOIS_SERVERNAME" = "TRUE";
"HIS_WHOIS_IDLETIME" = "TRUE";
"HIS_WHOIS_LOCALCHAN" = "TRUE";
# Who privacy
"HIS_WHO_SERVERNAME" = "TRUE";
"HIS_WHO_HOPCOUNT" = "TRUE";
# Network info
"HIS_NETSPLIT" = "TRUE";
"HIS_SERVERNAME" = "*.EOFCONFIG_NETWORK";
"HIS_SERVERINFO" = "The EOFCONFIG_NETWORK World";
# Operational
"CHECK" = "TRUE";
"CHECK_EXTENDED" = "TRUE";
"MAX_CHECK_OUTPUT" = "1000";
# Admin commands
"SETHOST" = "TRUE";
"NETWORK_REHASH" = "TRUE";
# Channel modes
"HALFOPS" = "TRUE";
# SSL/TLS
# "SSL_CERTFILE" = "EOFCONFIG_PREFIX/etc/ircd.pem";
# "SSL_KEYFILE" = "EOFCONFIG_PREFIX/etc/ircd.pem";
# "SSL_NOSSLv3" = "TRUE";
# CTCP versioning
"CTCP_VERSIONING" = "FALSE";
}; };
EOFCONFIG EOFCONFIG
@ -360,6 +498,8 @@ EOFCONFIG
sed -i "s|EOFCONFIG_PREFIX|$PREFIX|g" "$config_file" sed -i "s|EOFCONFIG_PREFIX|$PREFIX|g" "$config_file"
sed -i "s|EOFCONFIG_ADMIN_LOC|$admin_location|g" "$config_file" sed -i "s|EOFCONFIG_ADMIN_LOC|$admin_location|g" "$config_file"
sed -i "s|EOFCONFIG_ADMIN_CONTACT|$admin_contact|g" "$config_file" sed -i "s|EOFCONFIG_ADMIN_CONTACT|$admin_contact|g" "$config_file"
sed -i "s|EOFCONFIG_VHOST|$vhost|g" "$config_file"
sed -i "s|EOFCONFIG_NETWORK|$network|g" "$config_file"
log_success "Fișier de configurare generat: $config_file" log_success "Fișier de configurare generat: $config_file"
return 0 return 0
@ -439,11 +579,17 @@ main() {
# Citire interactivă de parametri # Citire interactivă de parametri
echo "" echo ""
echo -e "${GALBEN}Completare setări server:${NC}" echo -e "${GALBEN}Completare setări server:${NC}"
read -p " Nume server [localhost.localdomain]: " server_name read -p " Domeniu rețea [underchat.org]: " network_name
server_name=${server_name:-localhost.localdomain} network_name=${network_name:-underchat.org}
read -p " Descriere server [Nefarious IRCd Server]: " server_desc read -p " Nume server [ns1.${network_name}]: " server_name
server_desc=${server_desc:-Nefarious IRCd Server} server_name=${server_name:-ns1.${network_name}}
read -p " Descriere server [The ${network_name} Network]: " server_desc
server_desc=${server_desc:-The ${network_name} Network}
read -p " Virtual Host / IP [127.0.0.1]: " vhost_ip
vhost_ip=${vhost_ip:-127.0.0.1}
read -p " Numeric server [1]: " server_numeric read -p " Numeric server [1]: " server_numeric
server_numeric=${server_numeric:-1} server_numeric=${server_numeric:-1}
@ -451,14 +597,16 @@ main() {
read -p " Locație admin [Romania]: " admin_location read -p " Locație admin [Romania]: " admin_location
admin_location=${admin_location:-Romania} admin_location=${admin_location:-Romania}
read -p " Contact admin [admin@underchat.ro]: " admin_contact read -p " Contact admin [admin@${network_name}]: " admin_contact
admin_contact=${admin_contact:-admin@underchat.ro} admin_contact=${admin_contact:-admin@${network_name}}
else else
server_name=$(grep 'name = "' "$CONFIG_FILE" 2>/dev/null | head -1 | cut -d'"' -f2) server_name=$(grep 'name = "' "$CONFIG_FILE" 2>/dev/null | head -1 | cut -d'"' -f2)
server_name=${server_name:-localhost.localdomain} server_name=${server_name:-localhost.localdomain}
vhost_ip="127.0.0.1"
network_name="underchat.org"
fi fi
generate_config "$conf_file" "$server_name" "$server_desc" "$server_numeric" "$admin_location" "$admin_contact" generate_config "$conf_file" "$server_name" "$server_desc" "$server_numeric" "$admin_location" "$admin_contact" "$vhost_ip" "$network_name"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi