|
|
|
|
@ -1,4 +1,22 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
apps=("git" "sudo" "curl" "wget" "sed" "zip" "unzip")
|
|
|
|
|
|
|
|
|
|
# Función para verificar e instalar una aplicación
|
|
|
|
|
check_and_install() {
|
|
|
|
|
app=$1
|
|
|
|
|
if ! dpkg -s $app 2>/dev/null | grep -q "Status: install ok installed"; then
|
|
|
|
|
echo "$app no está instalado. Instalando..."
|
|
|
|
|
sudo apt-get install -y $app
|
|
|
|
|
echo "$app instalado correctamente."
|
|
|
|
|
else
|
|
|
|
|
echo "$app ya está instalado."
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Verificar e instalar cada aplicación
|
|
|
|
|
for app in "${apps[@]}"; do
|
|
|
|
|
check_and_install $app
|
|
|
|
|
done
|
|
|
|
|
if [ -f "/opt/wdp" ]
|
|
|
|
|
then
|
|
|
|
|
echo "found file"
|
|
|
|
|
@ -1015,23 +1033,10 @@ sed -i "s/f8f9fa/d0d0d0/g" /opt/FDMR-Monitor2/html/plugins/adminlte/css/adminlt
|
|
|
|
|
sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/ssconfunc.php
|
|
|
|
|
#sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /var/www/fdmr2/ssconfunc.php
|
|
|
|
|
|
|
|
|
|
if [ ! -f "/opt/FDMR-Monitor2/html/flags/314.png" ]
|
|
|
|
|
then
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/314.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/315.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/318.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/319.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/320.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/321.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/322.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/323.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/324.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/325.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/326.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/327.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/328.png
|
|
|
|
|
cp /opt/FDMR-Monitor2/html/flags/310.png /opt/FDMR-Monitor2/html/flags/329.png
|
|
|
|
|
fi
|
|
|
|
|
wget -q --no-check-certificate -r 'https://docs.google.com/uc?export=download&id=1vsviKjpZmL_mWVEW2UstNODGPl8-uNVo' -O /opt/flags.zip &&
|
|
|
|
|
|
|
|
|
|
sudo unzip -o /opt/flags.zip -d /opt/FDMR-Monitor2/html/flags/ &&
|
|
|
|
|
rm /opt/flags.zip
|
|
|
|
|
|
|
|
|
|
sudo cp fdmr-mon_SAMPLE.cfg fdmr-mon.cfg
|
|
|
|
|
sudo chmod 644 fdmr-mon.cfg
|
|
|
|
|
|