parent
5963422a5e
commit
edd3888ef7
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
#VARS
|
||||
CONFIGFILE="/etc/asterisk/extensions_custom.conf"
|
||||
DIRECTORY="/etc/asterisk/extensions.d"
|
||||
NEWCONF=$(cat <<EOF
|
||||
[globals]
|
||||
#tryinclude extensions.d/*.conf
|
||||
EOF
|
||||
)
|
||||
|
||||
#Test and Create sub config dir
|
||||
[ -d $DIRECTORY ] || mkdir $DIRECTORY
|
||||
|
||||
|
||||
#Test for and add config accordingly
|
||||
grep -Fxq "$NEWCONF" "$CONFIGFILE" || echo "$NEWCONF" >> "$CONFIGFILE"
|
||||
Loading…
Reference in new issue