#!/bin/bash ############ #DECLARAR VARIABLES/PATHS/COMANDOS gui=/usr/bin/zenity lanpath=/root/lanmap_images/ term=/usr/bin/urxvt temp=/tmp/tux_temp_file apache_main_conf=/etc/apache2/apache2.conf apache_site_conf=/etc/apache2/sites-available/default zz=sleep 2 zzz=sleep 3 back=tux-server wi=300 hi=250 info_wi=400 hide=--hide-column ############################3 echo -e "\tMenu de opciones de servidor" main_menu=`($gui --width=$wi --height=$hi --list --title="TUX-SERVER" --text="Opciones de servidor Tux.Server" --column="OP" --column="Opciones" "a" "Procesos" "b" "Apache2" "c" "Lanmap" "d" "Servidor FTP" "e" "Darkstat" "f" "Personal")` case $main_menu in a) ps -A | grep apache > $temp ps -A | grep darks >> $temp ps -A | grep lanmap >> $temp ps -A | grep pure >> $temp ps -A | grep sql >> $temp cat $temp | $gui --text-info --title="Procesos de servidor" $back_main ;; b) apache_menu="`($gui --list --width=$wi --height=$hi --title="Opciones servidor Apache2" --text="Escoge opción" --column="OP" --column="Opcines servidor" "a" "Concfiguración servidor" "b" "Configuración site" "c" "Iniciar" "d" "Reiniciar" "e" "Parar" "f" "Volver")`" case $apache_menu in a) $term -e vi $apache_main_conf $back ;; b) $term -e vi $apache_site_conf $back ;; c) $gui --question --title="Apache2" --text="Iniciar servidor" && sh /etc/init.d/apache2 start | $gui --text-info --title="Info Apache2" || $back ;; d) $gui --question --title="Apache2" --text="Reiniciar servidor" && sh /etc/init.d/apache2 restart | $gui --text-info --title="Info Apache2" || $back ;; e) $gui --question --title="Apache2" --text="Parar servidor" && sh /etc/init.d/apache2 stop | $gui --text-info --title="Info Apache2" || $back ;; f) $back ;; *) $back ;; esac c) $gui --info --title="Info" --text="Doesn't work" ;; d) $gui --info --title="Info" --text="This DOES work" ;; *) echo "No good option selected" ;; esac rm $temp