fusionpbx-install.sh/debian/resources/sngrep.sh

29 lines
871 B
Bash
Raw Normal View History

2017-03-06 06:10:25 +01:00
#!/bin/sh
2017-03-06 06:34:36 +01:00
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ./config.sh
. ./colors.sh
. ./environment.sh
2024-01-10 18:10:22 +01:00
#make sure keyrings directory exits
mkdir /etc/apt/keyrings
2017-03-06 06:10:25 +01:00
#add sngrep
2017-03-06 06:30:35 +01:00
if [ ."$cpu_architecture" = ."arm" ]; then
#source install
2019-02-17 17:30:31 +01:00
apt-get install -y git autoconf automake gcc make libncurses5-dev libpcap-dev libssl-dev libpcre3-dev
2017-03-06 06:38:32 +01:00
cd /usr/src && git clone https://github.com/irontec/sngrep
2017-03-06 06:37:15 +01:00
cd /usr/src/sngrep && ./bootstrap.sh
cd /usr/src/sngrep && ./configure
cd /usr/src/sngrep && make install
2017-03-06 06:30:35 +01:00
else
#package install
2024-01-10 18:10:22 +01:00
echo "deb [signed-by=/etc/apt/keyrings/irontec.gpg] http://packages.irontec.com/debian $(lsb_release -cs) main" > /etc/apt/sources.list.d/sngrep.list
wget http://packages.irontec.com/public.key -q -O - | gpg --dearmor -o /etc/apt/keyrings/irontec.gpg
2017-03-06 06:30:35 +01:00
apt-get update
2019-02-17 17:30:31 +01:00
apt-get install -y sngrep
2017-03-06 06:10:25 +01:00
fi