Optional IRC password
This commit is contained in:
parent
5df28375eb
commit
b2084b8dc7
|
@ -85,6 +85,9 @@ CONFIGURATION_FILE="freedombone.cfg"
|
||||||
SSH_PORT=2222
|
SSH_PORT=2222
|
||||||
IRC_PORT=6697
|
IRC_PORT=6697
|
||||||
|
|
||||||
|
# An optional password to log into IRC. This applies to all users
|
||||||
|
IRC_PASSWORD=
|
||||||
|
|
||||||
# If this file exists it contains a global password used with
|
# If this file exists it contains a global password used with
|
||||||
# disk image installs. This simplifies password management for
|
# disk image installs. This simplifies password management for
|
||||||
# deployment at scale
|
# deployment at scale
|
||||||
|
@ -868,6 +871,9 @@ function read_configuration {
|
||||||
if [[ $CONFIGURATION_FILE != '/root/freedombone.cfg' ]]; then
|
if [[ $CONFIGURATION_FILE != '/root/freedombone.cfg' ]]; then
|
||||||
cp $CONFIGURATION_FILE /root/freedombone.cfg
|
cp $CONFIGURATION_FILE /root/freedombone.cfg
|
||||||
fi
|
fi
|
||||||
|
if grep -q "IRC_PASSWORD" $CONFIGURATION_FILE; then
|
||||||
|
IRC_PASSWORD=$(grep "IRC_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
|
fi
|
||||||
if grep -q "DEFAULT_LANGUAGE" $CONFIGURATION_FILE; then
|
if grep -q "DEFAULT_LANGUAGE" $CONFIGURATION_FILE; then
|
||||||
DEFAULT_LANGUAGE=$(grep "DEFAULT_LANGUAGE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
DEFAULT_LANGUAGE=$(grep "DEFAULT_LANGUAGE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
fi
|
fi
|
||||||
|
@ -6689,6 +6695,9 @@ function install_irc_server {
|
||||||
sed -i 's/;RequireAuthPing = no/RequireAuthPing = no/g' /etc/ngircd/ngircd.conf
|
sed -i 's/;RequireAuthPing = no/RequireAuthPing = no/g' /etc/ngircd/ngircd.conf
|
||||||
sed -i "s/;Name = TheOper/Name = $MY_USERNAME/g" /etc/ngircd/ngircd.conf
|
sed -i "s/;Name = TheOper/Name = $MY_USERNAME/g" /etc/ngircd/ngircd.conf
|
||||||
sed -i "s/;Password = ThePwd/Password = $IRC_OPERATOR_PASSWORD/g" /etc/ngircd/ngircd.conf
|
sed -i "s/;Password = ThePwd/Password = $IRC_OPERATOR_PASSWORD/g" /etc/ngircd/ngircd.conf
|
||||||
|
if [ $IRC_PASSWORD ]; then
|
||||||
|
sed -i "0,/RE/s/Password =.*/Password = $IRC_PASSWORD/" /etc/ngircd/ngircd.conf
|
||||||
|
fi
|
||||||
# If we are on a mesh then DNS is not available
|
# If we are on a mesh then DNS is not available
|
||||||
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||||
sed -i "s/;DNS =.*/DNS = no/g" /etc/ngircd/ngircd.conf
|
sed -i "s/;DNS =.*/DNS = no/g" /etc/ngircd/ngircd.conf
|
||||||
|
|
Loading…
Reference in New Issue