All pastes #441524 Raw Edit

Anonymous

public shellscript v1 · immutable
·published 2007-04-15 19:08 UTC
rendered paste body
#!/bin/bash#############DECLARAR VARIABLES/PATHS/COMANDOSgui=/usr/bin/zenitylanpath=/root/lanmap_images/term=/usr/bin/urxvttemp=/tmp/tux_temp_fileapache_main_conf=/etc/apache2/apache2.confapache_site_conf=/etc/apache2/sites-available/defaultzz=sleep 2zzz=sleep 3back=tux-serverwi=300hi=250info_wi=400hide=--hide-column############################3echo -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" ;;esacrm $temp