Changeset 2108


Ignore:
Timestamp:
Jul 6, 2016, 9:09:19 AM (3 years ago)
Author:
Juanma
Message:

WIP on notifications and installation results

Location:
zero-center/trunk/fuentes/install-files/usr/bin
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • zero-center/trunk/fuentes/install-files/usr/bin/zero-installer

    r2053 r2108  
    8585                                echo "________________________________________________________________________________" >> /tmp/zero-installer.log
    8686                                echo " " >> /tmp/zero-installer.log
    87                                 su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$NAME_PACK $MSG_FINISH_INSTALLED /tmp/zero-installer.log'" $USER
     87                                su -c "notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$NAME_PACK $MSG_FINISH_INSTALLED /tmp/zero-installer.log'" $USER
    8888                                exit 0
    8989                        else
     
    9393                                echo "________________________________________________________________________________" >> /tmp/zero-installer.log
    9494                                echo " " >> /tmp/zero-installer.log
    95                                 su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$NAME_PACK $MSG_FINISH_UNINSTALLED /tmp/zero-installer.log'" $USER
     95                                su -c "notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$NAME_PACK $MSG_FINISH_UNINSTALLED /tmp/zero-installer.log'" $USER
    9696                                exit 1
    9797                        fi
     
    131131                                echo "________________________________________________________________________________" >> /tmp/zero-installer.log
    132132                                echo " " >> /tmp/zero-installer.log
    133                                 su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$2 $MSG_FINISH_SYSTEM1 $FINISHED $MSG_FINISH_SYSTEM /tmp/zero-installer.log'" $USER
     133                                su -c "notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$2 $MSG_FINISH_SYSTEM1 $FINISHED $MSG_FINISH_SYSTEM /tmp/zero-installer.log'" $USER
    134134                        else
    135135                                echo "Zero-center-------Your package $2 has NOT been $FINISHED in your system"
     
    138138                                echo "________________________________________________________________________________" >> /tmp/zero-installer.log
    139139                                echo " " >> /tmp/zero-installer.log
    140                                 su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$2 $MSG_FINISH_ERROR $FINISHED $MSG_FINISH_SYSTEM /tmp/zero-installer.log'" $USER
     140                                su -c "notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$2 $MSG_FINISH_ERROR $FINISHED $MSG_FINISH_SYSTEM /tmp/zero-installer.log'" $USER
    141141                                exit 1
    142142                        fi
     
    202202                LANG=en apt-cache show $2 | grep -i Version
    203203                if [ "$?" != "0" ]; then
    204                         su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' 'Impossible to install $2, it dont exists in your repositories, abort zero-installer command'" $USER
     204                        su -c "notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' 'Impossible to install $2, it dont exists in your repositories, abort zero-installer command'" $USER
    205205                        echo "Your package $2 don't exists in your repositories, abort zero-installer command"
    206206                        echo "Your package $2 don't exists in your repositories, abort zero-installer command" >> /tmp/zero-installer.log
    207                         #su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' 'Your package $2 DO NOT EXISTS in your repositories, abort zero-installer command, and you can view the log in /tmp/zero-installer.log. If you cannot resolve the problem please contact with Lliurex Team at http://mestreacasa.gva.es/web/lliurex/forums'" $USER
     207                        #su -c "notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' 'Your package $2 DO NOT EXISTS in your repositories, abort zero-installer command, and you can view the log in /tmp/zero-installer.log. If you cannot resolve the problem please contact with Lliurex Team at http://mestreacasa.gva.es/web/lliurex/forums'" $USER
    208208                        exit 1
    209209                fi
  • zero-center/trunk/fuentes/install-files/usr/bin/zero-lliurex-axel

    r1294 r2108  
    118118                                        done
    119119                        rm $2/$NAME_FILE*
    120                         notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$MSG_CANCELLED $NAME_FILE"
     120                        notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$MSG_CANCELLED $NAME_FILE"
    121121                        echo "Your downloading file $1 has been cancelled"
    122122                        echo ""
    123123                        exit 1
    124124                        fi
    125                 notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$NAME_FILE $MSG_DONWLOADED $2"
     125                notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$NAME_FILE $MSG_DONWLOADED $2"
    126126                echo "File $1 is downloaded in $2"
    127127        }
     
    167167                                        done
    168168                        rm "$2"/"$3"*
    169                         notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$MSG_CANCELLED $1"
     169                        notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$MSG_CANCELLED $1"
    170170                        echo "Your downloading file $1 has been cancelled"
    171171                        echo ""
    172172                        exit 1
    173173                        fi
    174                 notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$1 $MSG_DONWLOADED $2"
     174                notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$1 $MSG_DONWLOADED $2"
    175175                echo "File $3 is downloaded in $2"
    176176        }
  • zero-center/trunk/fuentes/install-files/usr/bin/zero-lliurex-wget

    r1646 r2108  
    117117                                        done
    118118                        rm $2/$NAME_FILE*
    119                         notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$MSG_CANCELLED $NAME_FILE"
     119                        notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$MSG_CANCELLED $NAME_FILE"
    120120                        echo "Your downloading file $1 has been cancelled"
    121121                        echo ""
    122122                        exit 1
    123123                        fi
    124                 notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$NAME_FILE $MSG_DONWLOADED $2"
     124                notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$NAME_FILE $MSG_DONWLOADED $2"
    125125                echo "File $1 is downloaded in $2"
    126126        }
     
    166166                                        done
    167167                        rm "$2"/"$3"*
    168                         notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$MSG_CANCELLED $1"
     168                        notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$MSG_CANCELLED $1"
    169169                        echo "Your downloading file $1 has been cancelled"
    170170                        echo ""
    171171                        exit 1
    172172                        fi
    173                 notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$1 $MSG_DONWLOADED $2"
     173                notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg "Zero-Downloader-Helper" "$1 $MSG_DONWLOADED $2"
    174174                echo "File $3 is downloaded in $2"
    175175        }
  • zero-center/trunk/fuentes/install-files/usr/bin/zero-reinstall

    r1294 r2108  
    6868                echo "Zero-installer install the package $PACKAGE_NAME"
    6969                zero-installer install "$PACKAGE_NAME"
     70                #Get zero-installer exit status
     71                ERROR=$?
    7072                #Me guardo el fichero de los logs por si algo fallase o para revisarlo
    7173                cat $ZERO_LOG >> $INSTALL_LOG
     
    7375#Testeamos si el paquete se ha instalado bien
    7476                TEST=$( dpkg-query -s $PACKAGE_NAME 2> /dev/null| grep Status | cut -d " " -f 4 )
    75                 if [ "$TEST" = 'installed' ]; then
     77                if [ "$TEST" = 'installed' -a "$ERROR" -eq 0 ]; then
    7678                        echo " ------------------- " >> $INSTALL_LOG
    7779                        echo "Package $PACKAGE_NAME has been installed, Congratulations"
    7880                        zenity --info --title="Zero-installer" --text="$PACKAGE_NAME $MSG_FINISH_INSTALLED $INSTALL_LOG" > /dev/null 2>&1 &
    79                         su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$PACKAGE_NAME $MSG_FINISH_INSTALLED $INSTALL_LOG'" $USER
     81                        su -c "notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$PACKAGE_NAME $MSG_FINISH_INSTALLED $INSTALL_LOG'" $USER
    8082                        exit 0
    8183                else
     
    8385                        echo "$MSG_FINISH_ERROR"
    8486                        zenity --info --title="Zero-installer" --text="$PACKAGE_NAME $MSG_FINISH_ERROR $INSTALL_LOG" > /dev/null 2>&1 &
    85                         su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$PACKAGE_NAME $MSG_FINISH_ERROR $INSTALL_LOG'" $USER
     87                        su -c "notify-send -t 5000 -u critical -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$PACKAGE_NAME $MSG_FINISH_ERROR $INSTALL_LOG'" $USER
    8688                        exit 1
    8789                fi
  • zero-center/trunk/fuentes/install-files/usr/bin/zero-reinstall-list

    r101 r2108  
    106106                echo "Zero-installer install the package $i"
    107107                zero-installer install $i
     108                #Get zero-installer exit status
     109                ERROR=$?
    108110                #Me guardo el fichero de los logs por si algo fallase o para revisarlo
    109111                cat $ZERO_LOG >> $INSTALL_LOG
     
    127129
    128130fgrep "is not in repository" "$INSTALL_LOG"
    129 if  [ "$?" == "0" ]; then
     131if  [ "$?" == "0" -o "$ERROR" -gt 0 ]; then
    130132        zenity --info --title="Zero-reinstaller" --text="$MSG_REVIEW1 $INSTALL_LOG. $MSG_REVIEW2 .$MSG_CONTACT" > /dev/null 2>&1 &
     133        exit 1
    131134else
    132135        zenity --info --title="Zero-reinstaller" --text="$PACKAGE_NAME $MSG_FINISH_INSTALLED $INSTALL_LOG" > /dev/null 2>&1 &
  • zero-center/trunk/fuentes/install-files/usr/bin/zero-repos-update

    r1294 r2108  
    5656                echo "________________________________________________________________________________" >> "$LOG"
    5757                echo " " >> "$LOG"
    58                 su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Lliurex-Update' '$MSG_UPDATEDINFO'" $USER
     58                su -c "notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Lliurex-Update' '$MSG_UPDATEDINFO'" $USER
    5959        }
    6060
Note: See TracChangeset for help on using the changeset viewer.