forked from norman/fusionpbx-install.sh-github-mirror
Specify full paths for wget and tar commands
Make sure wget is installed
This commit is contained in:
15
debian/resources/switch/source-sounds.sh
vendored
15
debian/resources/switch/source-sounds.sh
vendored
@@ -10,16 +10,19 @@ cd "$(dirname "$0")"
|
|||||||
# Change the working directory
|
# Change the working directory
|
||||||
cd /usr/share/freeswitch/sounds
|
cd /usr/share/freeswitch/sounds
|
||||||
|
|
||||||
|
# Make sure wget is installed
|
||||||
|
apt-get install -y wget
|
||||||
|
|
||||||
# Array of sample rates
|
# Array of sample rates
|
||||||
sample_rates="48000 32000 16000 8000"
|
sample_rates="48000 32000 16000 8000"
|
||||||
|
|
||||||
# Loop through each sample rate
|
# Loop through each sample rate
|
||||||
for sample_rate in $sample_rates; do
|
for sample_rate in $sample_rates; do
|
||||||
# Download the file
|
# Download the file
|
||||||
wget "https://files.freeswitch.org/releases/sounds/freeswitch-sounds-en-us-callie-${sample_rate}-1.0.53.tar.gz"
|
/usr/bin/wget "https://files.freeswitch.org/releases/sounds/freeswitch-sounds-en-us-callie-${sample_rate}-1.0.53.tar.gz"
|
||||||
|
|
||||||
# Extract the file
|
# Extract the file
|
||||||
tar xvzf "freeswitch-sounds-en-us-callie-${sample_rate}-1.0.53.tar.gz"
|
/usr/bin/tar xvzf "freeswitch-sounds-en-us-callie-${sample_rate}-1.0.53.tar.gz"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Change to directory to the music directory
|
# Change to directory to the music directory
|
||||||
@@ -28,14 +31,14 @@ cd /usr/share/freeswitch/sounds/music
|
|||||||
# Loop through each sample rate
|
# Loop through each sample rate
|
||||||
for sample_rate in $sample_rates; do
|
for sample_rate in $sample_rates; do
|
||||||
# Download the file
|
# Download the file
|
||||||
wget "https://files.freeswitch.org/releases/sounds/freeswitch-sounds-music-${sample_rate}-1.0.52.tar.gz"
|
/usr/bin/wget "https://files.freeswitch.org/releases/sounds/freeswitch-sounds-music-${sample_rate}-1.0.52.tar.gz"
|
||||||
|
|
||||||
# Extract the file
|
# Extract the file
|
||||||
tar xvzf "freeswitch-sounds-music-${sample_rate}-1.0.52.tar.gz"
|
/usr/bin/tar xvzf "freeswitch-sounds-music-${sample_rate}-1.0.52.tar.gz"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Move the music to the default directory
|
# Move the music to the default directory
|
||||||
mv music default
|
/usr/bin/mv music default
|
||||||
|
|
||||||
# Remove the tar.gz files
|
# Remove the tar.gz files
|
||||||
rm /usr/share/freeswitch/sounds/music/*.tar.gz
|
/usr/bin/rm /usr/share/freeswitch/sounds/music/*.tar.gz
|
||||||
|
|||||||
Reference in New Issue
Block a user