This commit is contained in:
Esteban Mackay Q 2023-11-29 17:34:20 -05:00
parent f0243570ca
commit 855b4995cb
2 changed files with 192 additions and 0 deletions

View File

@ -136,6 +136,65 @@ nomenu=no
hideNodeURL=no
?>
EOFX
fi
if [ -f "/etc/allmon3/allmon3.ini" ]; then
cat > "/etc/allmon3/allmon3.ini" <<- "EOFX"
;
; This is the master configuration file for all ASL/Asterisks node-related
; information. It is used for all server daemon processes
; (e.g. asl-statmon, asl-cmdlink) and the web interface/API.
;
; Each configuration item below is marked (R) or (O) for required or optional
; repsectively along with usage notes. The value in the table below is the
; default value for optiional items or examples for required items.
;
; [1999]
; host = 192.0.2.0 # (R) DNS name or IP address of the Asterisk/ASL node
;
; port = 5038 # (O) port of the Asterisk manager
;
; user = admin # (R) username of the Asterisk monitor, most
; # commonly 'admin'
;
; pass = password # (R) password of the monitor user
;
; multinodes = # (O) this node is a server hosting multiple nodes
; # and this is the "primary" record for the host.
;
; voters = n[,n,...] # (O) List voters on this server, comma
; # separate. No value disabled voters
;
; pollinterval = 1 # (O) polling interval to asterisk in seconds
; # default is 1. this value can be expressed as
; # a decimal fraction of a second - e.g., .5
; # is 500ms, .375 is 375ms, etc.
;
; vpollinterval = 1 # (O) broadcast interval of voter data in seconds
; # default is 1. this value can be expressed as
; # a decimal fraction of a second - e.g., .5
; # is 500ms, .375 is 375ms, etc.
;
; retryinterval = 15 # (O) seconds between retries if initial connection to
; # asterisk is lost (optional, default 15)
;
; retrycount = # (O) number of times to retry a lost asterisk
; # connection before ending (default infinite)
; For a basic installation, you chould be able to uncomment the below,
; change 1999 to your node number and set the pass= as
; set in asterisk/manager.conf
;[1999]
;host=127.0.0.1
;user=admin
;pass=password
[a5a4a3a2a1]
host=127.0.0.1
user=admin
pass=a2b2c2d2e2
EOFX
fi
servicios=("md380-emu99.service" "analog_bridge99.service" "mmdvm_bridge99.service" "md380-emu.service" "analog_bridge.service" "mmdvm_bridge.service")

View File

@ -161,6 +161,64 @@ passwd=a2b2c2d2e2
nomenu=no
hideNodeURL=no
?>
EOFX
fi
if [ -f "/etc/allmon3/allmon3.ini" ]; then
cat > "/etc/allmon3/allmon3.ini" <<- "EOFX"
;
; This is the master configuration file for all ASL/Asterisks node-related
; information. It is used for all server daemon processes
; (e.g. asl-statmon, asl-cmdlink) and the web interface/API.
;
; Each configuration item below is marked (R) or (O) for required or optional
; repsectively along with usage notes. The value in the table below is the
; default value for optiional items or examples for required items.
;
; [1999]
; host = 192.0.2.0 # (R) DNS name or IP address of the Asterisk/ASL node
;
; port = 5038 # (O) port of the Asterisk manager
;
; user = admin # (R) username of the Asterisk monitor, most
; # commonly 'admin'
;
; pass = password # (R) password of the monitor user
;
; multinodes = # (O) this node is a server hosting multiple nodes
; # and this is the "primary" record for the host.
;
; voters = n[,n,...] # (O) List voters on this server, comma
; # separate. No value disabled voters
;
; pollinterval = 1 # (O) polling interval to asterisk in seconds
; # default is 1. this value can be expressed as
; # a decimal fraction of a second - e.g., .5
; # is 500ms, .375 is 375ms, etc.
;
; vpollinterval = 1 # (O) broadcast interval of voter data in seconds
; # default is 1. this value can be expressed as
; # a decimal fraction of a second - e.g., .5
; # is 500ms, .375 is 375ms, etc.
;
; retryinterval = 15 # (O) seconds between retries if initial connection to
; # asterisk is lost (optional, default 15)
;
; retrycount = # (O) number of times to retry a lost asterisk
; # connection before ending (default infinite)
; For a basic installation, you chould be able to uncomment the below,
; change 1999 to your node number and set the pass= as
; set in asterisk/manager.conf
;[1999]
;host=127.0.0.1
;user=admin
;pass=password
[a5a4a3a2a1]
host=127.0.0.1
user=admin
pass=a2b2c2d2e2
EOFX
fi
#allstar
@ -185,6 +243,9 @@ sed -i "s/astnode =.*/astnode = $asln/g" /etc/asterisk/echolink.conf
if [ -d "/var/www/html/allmon2" ]; then
sed -i "s/a5a4a3a2a1/$asln/g; s/a2b2c2d2e2/$asld/g" /var/www/html/allmon2/allmon.ini.php
fi
if [ -f "/etc/allmon3/allmon3.ini" ]; then
sed -i "s/a5a4a3a2a1/$asln/g; s/a2b2c2d2e2/$asld/g" /etc/allmon3/allmon3.ini
fi
#
if [ -f "/lib/systemd/system/asterisk.service" ]; then
systemctl stop asterisk &&
@ -195,6 +256,11 @@ sed -i "s/astnode =.*/astnode = $asln/g" /etc/asterisk/echolink.conf
systemctl stop asl-asterisk &&
systemctl start asl-asterisk
systemctl enable asl-asterisk
fi
if [ -f "/lib/systemd/system/allmon3.service" ]; then
systemctl stop allmon3 &&
systemctl start allmon3
systemctl enable allmon3
fi
;;
2)
@ -207,6 +273,11 @@ sed -i "s/astnode =.*/astnode = $asln/g" /etc/asterisk/echolink.conf
systemctl stop asl-asterisk &&
systemctl start asl-asterisk
systemctl enable asl-asterisk
fi
if [ -f "/lib/systemd/system/allmon3.service" ]; then
systemctl stop allmon3 &&
systemctl start allmon3
systemctl enable allmon3
fi
;;
3)
@ -217,6 +288,10 @@ sed -i "s/astnode =.*/astnode = $asln/g" /etc/asterisk/echolink.conf
if [ -f "/lib/systemd/system/asl-asterisk.service" ]; then
systemctl stop asl-asterisk
systemctl disable asl-asterisk
fi
if [ -f "/lib/systemd/system/allmon3.service" ]; then
systemctl stop allmon3 &&
systemctl disable allmon3
fi
;;
4)
@ -256,6 +331,64 @@ passwd=a2b2c2d2e2
nomenu=no
hideNodeURL=no
?>
EOFX
fi
if [ -f "/etc/allmon3/allmon3.ini" ]; then
cat > "/etc/allmon3/allmon3.ini" <<- "EOFX"
;
; This is the master configuration file for all ASL/Asterisks node-related
; information. It is used for all server daemon processes
; (e.g. asl-statmon, asl-cmdlink) and the web interface/API.
;
; Each configuration item below is marked (R) or (O) for required or optional
; repsectively along with usage notes. The value in the table below is the
; default value for optiional items or examples for required items.
;
; [1999]
; host = 192.0.2.0 # (R) DNS name or IP address of the Asterisk/ASL node
;
; port = 5038 # (O) port of the Asterisk manager
;
; user = admin # (R) username of the Asterisk monitor, most
; # commonly 'admin'
;
; pass = password # (R) password of the monitor user
;
; multinodes = # (O) this node is a server hosting multiple nodes
; # and this is the "primary" record for the host.
;
; voters = n[,n,...] # (O) List voters on this server, comma
; # separate. No value disabled voters
;
; pollinterval = 1 # (O) polling interval to asterisk in seconds
; # default is 1. this value can be expressed as
; # a decimal fraction of a second - e.g., .5
; # is 500ms, .375 is 375ms, etc.
;
; vpollinterval = 1 # (O) broadcast interval of voter data in seconds
; # default is 1. this value can be expressed as
; # a decimal fraction of a second - e.g., .5
; # is 500ms, .375 is 375ms, etc.
;
; retryinterval = 15 # (O) seconds between retries if initial connection to
; # asterisk is lost (optional, default 15)
;
; retrycount = # (O) number of times to retry a lost asterisk
; # connection before ending (default infinite)
; For a basic installation, you chould be able to uncomment the below,
; change 1999 to your node number and set the pass= as
; set in asterisk/manager.conf
;[1999]
;host=127.0.0.1
;user=admin
;pass=password
[a5a4a3a2a1]
host=127.0.0.1
user=admin
pass=a2b2c2d2e2
EOFX
fi
;;