diff --git a/install_media-push-plugin.sh b/install_media-push-plugin.sh new file mode 100644 index 00000000..f2131d5d --- /dev/null +++ b/install_media-push-plugin.sh @@ -0,0 +1,119 @@ +#!/bin/bash + + +# To install latest snapshot version give --snapshot parameter +# sudo ./install_media-push-plugin.sh --snapshot +# To install latest version just call directly +# sudo ./install_media-push-plugin.sh + + + +# Function to install Google Chrome on Debian-based systems +install_chrome_debian() { + sudo apt-get update -y + sudo apt-get install -y wget gnupg2 + #wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + #sudo dpkg -i google-chrome-stable_current_amd64.deb + wget https://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/google-chrome-stable_120.0.6099.199-1_amd64.deb + sudo dpkg -i google-chrome-stable_120.0.6099.199-1_amd64.deb + sudo apt-get install -f -y + rm google-chrome-stable_current_amd64.deb +} + +# Function to install Google Chrome on Red Hat-based systems +install_chrome_redhat() { + cat <" | tail -n 1 | xargs | cut -c 10-${LAST_INDEX}) + +wget -O media-push.jar "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=${REDIRECT}&g=io.antmedia.plugin&a=media-push&v=${LATEST_VERSION}&e=jar" + +if [ $? -ne 0 ]; then + echo "There is a problem in downloading the media push plugin. Please send the log of this console to support@antmedia.io" + exit $? +fi + +sudo mv media-push.jar /usr/local/antmedia/plugins/ + +# Check if the copy command was successful +if [ $? -eq 0 ]; then + sudo chown antmedia:antmedia /usr/local/antmedia/plugins/media-push.jar + echo "Media Push Plugin is installed successfully.Please restart the service to make it effective." + echo "Run the command below to restart antmedia" + echo "sudo service antmedia restart" +else + echo "Media Push Plugin cannot be installed. Check the error above." + exit $?; +fi