ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Shell Scripting to be done for verifying the software version and also not to update

    IT Discussion
    shell scripting
    5
    72
    10.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LakshmanaL
      Lakshmana @A Former User
      last edited by

      @thecreativeone91 said:

      versions in synaptic package manager if you have a GUI.

      I need to have specific version of mozilla and it need not to be updated and also to do shell script to verify the specific version is present and the specific version should not be updated.This is my manager said me to do as a task for one client

      handsofqwertyH 1 Reply Last reply Reply Quote 0
      • handsofqwertyH
        handsofqwerty @Lakshmana
        last edited by

        @Lakshmana said:

        @thecreativeone91 said:

        versions in synaptic package manager if you have a GUI.

        I need to have specific version of mozilla and it need not to be updated and also to do shell script to verify the specific version is present and the specific version should not be updated.This is my manager said me to do as a task for one client

        If you have a GUI, why do you need to do a shell script? Go into the program and check the About part to see the version...

        LakshmanaL scottalanmillerS 2 Replies Last reply Reply Quote 0
        • LakshmanaL
          Lakshmana @handsofqwerty
          last edited by Lakshmana

          @handsofqwerty said:

          have a GUI, why do you need to do a shell script? Go into the program and check the About part to see the version...

          I need to use script only to see the status at Nagios .I should not use GUI for this process

          ? 1 Reply Last reply Reply Quote 0
          • handsofqwertyH
            handsofqwerty
            last edited by

            But because you asked, the command is as follows:

            firefox -v
            
            1 Reply Last reply Reply Quote 1
            • handsofqwertyH
              handsofqwerty
              last edited by

              If you want to get really fancy, you can pipe it to a grep and have it highlight where in the output it shows the version.

               firefox -version | grep "Mozilla Firefox"
              

              This is the result:
              upload-13388f67-e43f-475e-a5ae-79de7663aff2

              1 Reply Last reply Reply Quote 1
              • ?
                A Former User @Lakshmana
                last edited by

                @Lakshmana said:

                @handsofqwerty said:

                have a GUI, why do you need to do a shell script? Go into the program and check the About part to see the version...

                I need to use script only to see the status at Nagios .

                That's not really the right tool for the job.

                LakshmanaL 1 Reply Last reply Reply Quote 0
                • LakshmanaL
                  Lakshmana @A Former User
                  last edited by Lakshmana

                  @thecreativeone91 version details came but i need to do it in shell scripting by the file in .sh method.I need this mozila not to update and also needs to be verified whether the specified version is present in the ubuntu machine

                  handsofqwertyH 1 Reply Last reply Reply Quote 0
                  • handsofqwertyH
                    handsofqwerty @Lakshmana
                    last edited by

                    @Lakshmana said:

                    @thecreativeone91 version details came but i need to do it in shell scripting by the file in .sh method.I need this mozila not to update and also needs to be verified whether the specified version is present in the ubuntu machine

                    Well you have the command now. If you want a it to be a shell script, something like this will work...

                    #!/bin/sh
                    firefox -version
                    

                    If you throw a "> /var/log/firefox-version.log" at the end of the command, it'll log it to a file for you too.

                    LakshmanaL 1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller @A Former User
                      last edited by

                      @thecreativeone91 said:

                      why the heck would stop firefox auto update? I suppose you could just download the version you want to use and run it from that location.

                      If you read his other threads, he addresses why he needs these things (insane manager trying to screw the company.) It's simply a hard requirement that he has with no technical or business reason. Just how it is.

                      1 Reply Last reply Reply Quote 1
                      • scottalanmillerS
                        scottalanmiller @handsofqwerty
                        last edited by

                        @handsofqwerty said:

                        @Lakshmana said:

                        @thecreativeone91 said:

                        versions in synaptic package manager if you have a GUI.

                        I need to have specific version of mozilla and it need not to be updated and also to do shell script to verify the specific version is present and the specific version should not be updated.This is my manager said me to do as a task for one client

                        If you have a GUI, why do you need to do a shell script? Go into the program and check the About part to see the version...

                        I assume he wants to check this more than once. A script is way cheaper than a human checking things all of the time.

                        1 Reply Last reply Reply Quote 1
                        • scottalanmillerS
                          scottalanmiller
                          last edited by

                          Getting the version looks easy. No idea how a script would verify that auto-update is off. There might be a flag for that somewhere. Although if you keep checking the version and it never changes, that would tell you that it is turned off.

                          1 Reply Last reply Reply Quote 1
                          • LakshmanaL
                            Lakshmana @handsofqwerty
                            last edited by

                            @handsofqwerty I also need to compare the specific version and also stop auto update

                            1 Reply Last reply Reply Quote 0
                            • LakshmanaL
                              Lakshmana
                              last edited by

                              I need to run only the mozilla 31 and java 1.7.0.65 in the ubuntu system and then if the version is higher or lower means the mozilla to be uninstalled and then installation of mozilla 31 to be done automatically and then the mozilla 31 to be runned in the system.How to do ??????

                              1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller
                                last edited by

                                This is a reasonable logically approach. Basically you are scripting up what something like Chef or Puppet already do.

                                1 Reply Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller
                                  last edited by

                                  Now as you are not installing these things but just copying them into place this will be much harder as you have to figure out exactly how you want this to work. What if other versions are installed? What if other versions are copied? How do you determine if the right version is there? How do you determine if the wrong version is there? What actions to take depending on those things?

                                  This is not nearly as simple as it might sound. There are many, many variables.

                                  LakshmanaL 1 Reply Last reply Reply Quote 0
                                  • LakshmanaL
                                    Lakshmana @scottalanmiller
                                    last edited by

                                    @scottalanmiller I need to run only mozilla version 31 and java 1.7.0_65 in ubuntu version 14.04 64 Bit OS.If the mozilla version is below 31 means or above 31 means there should be process done where the mozilla above or below version mozilla has to be uninstalled by automatically by running the script only.

                                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller @Lakshmana
                                      last edited by

                                      @Lakshmana said:

                                      @scottalanmiller I need to run only mozilla version 31 and java 1.7.0_65 in ubuntu version 14.04 64 Bit OS.If the mozilla version is below 31 means or above 31 means there should be process done where the mozilla above or below version mozilla has to be uninstalled by automatically by running the script only.

                                      I understand that part. But it is much more complicated than that. You are stating something that is not enough to solve the problem.

                                      LakshmanaL 1 Reply Last reply Reply Quote 0
                                      • scottalanmillerS
                                        scottalanmiller
                                        last edited by

                                        For example "I need to only run Firefox Version 31" doesn't tell me enough. What if more versions are installed? What if other versions exist but are not installed? How do you determine the running version?

                                        LakshmanaL 1 Reply Last reply Reply Quote 0
                                        • LakshmanaL
                                          Lakshmana @scottalanmiller
                                          last edited by

                                          @scottalanmiller Ok.This work has to be carried by me within two days.I have run the script tommorrow

                                          scottalanmillerS 1 Reply Last reply Reply Quote 0
                                          • scottalanmillerS
                                            scottalanmiller @Lakshmana
                                            last edited by

                                            @Lakshmana said:

                                            @scottalanmiller Ok.This work has to be carried by me within two days.I have run the script tommorrow

                                            these are questions that you need your manager to answer before even knowing what the script is supposed to do.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 1 / 4
                                            • First post
                                              Last post