Speed up systemd configuration
This commit is contained in:
parent
c92e497522
commit
fa2e3c4710
|
@ -7,6 +7,7 @@ ${layer_1_hold}
|
||||||
verbose ${verboselevel}
|
verbose ${verboselevel}
|
||||||
${aocd}
|
${aocd}
|
||||||
${aocs}
|
${aocs}
|
||||||
|
local-tones ${local_tones}
|
||||||
timeouts 60,4,180,180,60
|
timeouts 60,4,180,180,60
|
||||||
cc 'name v5-${v5_if}-${v5_port}'
|
cc 'name v5-${v5_if}-${v5_port}'
|
||||||
cc 'local ${cc_ip}:${cc_port}'
|
cc 'local ${cc_ip}:${cc_port}'
|
||||||
|
|
|
@ -9,6 +9,7 @@ ${loop_disconnect}
|
||||||
${lr_on_connect}
|
${lr_on_connect}
|
||||||
${recall}
|
${recall}
|
||||||
${metering}
|
${metering}
|
||||||
|
local-tones ${local_tones}
|
||||||
cc 'name v5-${v5_if}-${v5_port}'
|
cc 'name v5-${v5_if}-${v5_port}'
|
||||||
cc 'local ${cc_ip}:${cc_port}'
|
cc 'local ${cc_ip}:${cc_port}'
|
||||||
cc 'remote ${cc_ip}:4000'
|
cc 'remote ${cc_ip}:4000'
|
||||||
|
|
|
@ -33,6 +33,7 @@ OSMOPSTNCFG['metering']="metering"
|
||||||
OSMOPSTNCFG['recall']=""
|
OSMOPSTNCFG['recall']=""
|
||||||
OSMOPSTNCFG['loop_disconnect']=""
|
OSMOPSTNCFG['loop_disconnect']=""
|
||||||
OSMOPSTNCFG['lr_on_connect']=""
|
OSMOPSTNCFG['lr_on_connect']=""
|
||||||
|
OSMOPSTNCFG['local_tones']="german"
|
||||||
|
|
||||||
OSMOISDNCFG['cc_ip']="$SYSIP"
|
OSMOISDNCFG['cc_ip']="$SYSIP"
|
||||||
OSMOISDNCFG['v5_if']="$V5_IFADDR"
|
OSMOISDNCFG['v5_if']="$V5_IFADDR"
|
||||||
|
@ -40,6 +41,7 @@ OSMOISDNCFG['verboselevel']="2"
|
||||||
OSMOISDNCFG['aocd']="aocd"
|
OSMOISDNCFG['aocd']="aocd"
|
||||||
OSMOISDNCFG['aocs']="aocs"
|
OSMOISDNCFG['aocs']="aocs"
|
||||||
OSMOISDNCFG['layer_1_hold']="layer-1-hold 1"
|
OSMOISDNCFG['layer_1_hold']="layer-1-hold 1"
|
||||||
|
OSMOISDNCFG['local_tones']="german"
|
||||||
|
|
||||||
template() {
|
template() {
|
||||||
ARRAY_NAME="$1"
|
ARRAY_NAME="$1"
|
||||||
|
@ -59,17 +61,22 @@ read ok
|
||||||
|
|
||||||
|
|
||||||
### Stop and disable PSTN endpoints
|
### Stop and disable PSTN endpoints
|
||||||
cd /etc/systemd/system/multi-user.target.wants
|
#cd /etc/systemd/system/multi-user.target.wants
|
||||||
for i in `ls osmo-cc-pstn-endpoint@*`; do
|
#for i in `ls osmo-cc-pstn-endpoint@*`; do
|
||||||
echo "Stop and disable endpoint $i..."
|
# echo "Stop and disable endpoint $i..."
|
||||||
systemctl stop $i
|
# systemctl stop $i
|
||||||
systemctl disable $i
|
# systemctl disable $i
|
||||||
done
|
#done
|
||||||
for i in `ls osmo-cc-misdn-endpoint@*`; do
|
#for i in `ls osmo-cc-misdn-endpoint@*`; do
|
||||||
echo "Stop and disable endpoint $i..."
|
# echo "Stop and disable endpoint $i..."
|
||||||
systemctl stop $i
|
# systemctl stop $i
|
||||||
systemctl disable $i
|
# systemctl disable $i
|
||||||
done
|
#done
|
||||||
|
echo "Stop and disable PSTN/ISDN endpoints..."
|
||||||
|
systemctl stop osmo-cc-pstn-endpoint@\*.service
|
||||||
|
systemctl disable osmo-cc-pstn-endpoint@.service
|
||||||
|
systemctl stop osmo-cc-misdn-endpoint@\*.service
|
||||||
|
systemctl disable osmo-cc-misdn-endpoint@.service
|
||||||
|
|
||||||
### Stop OSMO-V5-LE
|
### Stop OSMO-V5-LE
|
||||||
|
|
||||||
|
@ -128,16 +135,34 @@ done
|
||||||
|
|
||||||
for portgroup in ${!PSTNPORTS[@]}; do
|
for portgroup in ${!PSTNPORTS[@]}; do
|
||||||
for i in `seq ${PSTNPORTS[$portgroup]}`; do
|
for i in `seq ${PSTNPORTS[$portgroup]}`; do
|
||||||
echo "Enable and start PSTN endpoint ${V5_IFADDR}_$i"
|
echo "Enable PSTN endpoint ${V5_IFADDR}_$i"
|
||||||
systemctl enable osmo-cc-pstn-endpoint@${V5_IFADDR}_$i.service
|
systemctl --no-reload enable osmo-cc-pstn-endpoint@${V5_IFADDR}_$i.service
|
||||||
systemctl start osmo-cc-pstn-endpoint@${V5_IFADDR}_$i.service
|
|
||||||
done
|
|
||||||
done
|
|
||||||
for portgroup in ${!ISDNPORTS[@]}; do
|
|
||||||
for i in `seq ${ISDNPORTS[$portgroup]}`; do
|
|
||||||
echo "Enable and start ISDN endpoint ${V5_IFADDR}_$i"
|
|
||||||
systemctl enable osmo-cc-misdn-endpoint@${V5_IFADDR}_$i.service
|
|
||||||
systemctl start osmo-cc-misdn-endpoint@${V5_IFADDR}_$i.service
|
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Reloading systemd"
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
for portgroup in ${!PSTNPORTS[@]}; do
|
||||||
|
for i in `seq ${PSTNPORTS[$portgroup]}`; do
|
||||||
|
echo "Start PSTN endpoint ${V5_IFADDR}_$i"
|
||||||
|
systemctl start osmo-cc-pstn-endpoint@${V5_IFADDR}_$i.service
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
for portgroup in ${!ISDNPORTS[@]}; do
|
||||||
|
for i in `seq ${ISDNPORTS[$portgroup]}`; do
|
||||||
|
echo "Enable ISDN endpoint ${V5_IFADDR}_$i"
|
||||||
|
systemctl --no-reload enable osmo-cc-misdn-endpoint@${V5_IFADDR}_$i.service
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Reloading systemd"
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
for portgroup in ${!ISDNPORTS[@]}; do
|
||||||
|
for i in `seq ${ISDNPORTS[$portgroup]}`; do
|
||||||
|
echo "Start ISDN endpoint ${V5_IFADDR}_$i"
|
||||||
|
systemctl start osmo-cc-misdn-endpoint@${V5_IFADDR}_$i.service
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in New Issue