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

    A script to pull updates from GH or use History

    IT Discussion
    xen orchestra community xen orchestra updater bash xen orchestra xo
    5
    18
    2.8k
    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.
    • DustinB3403D
      DustinB3403
      last edited by

      What do you guys think?

      This would replace the local copy that you may have under /opt/xo-update, and it means you don't have to pull any script changes when there are major updates.

      1 Reply Last reply Reply Quote 0
      • stacksofplatesS
        stacksofplates
        last edited by

        Why not just have a cron job that runs daily?

        DustinB3403D 1 Reply Last reply Reply Quote 0
        • DustinB3403D
          DustinB3403 @stacksofplates
          last edited by

          @stacksofplates That would require the XO admin to configure the cron job.

          That is of course an option, and not off the table.

          1 Reply Last reply Reply Quote 0
          • DustinB3403D
            DustinB3403
            last edited by

            An issue with a cronjob running this daily, is you could end up breaking XO.

            Which may or may not interfere with your backup operations.

            stacksofplatesS 1 Reply Last reply Reply Quote 1
            • stacksofplatesS
              stacksofplates @DustinB3403
              last edited by

              @DustinB3403 said in A script to pull updates from GH or use History:

              An issue with a cronjob running this daily, is you could end up breaking XO.

              Which may or may not interfere with your backup operations.

              Not the actual update. Instead of using this to update the update script.

              DustinB3403D 1 Reply Last reply Reply Quote 0
              • DustinB3403D
                DustinB3403 @stacksofplates
                last edited by

                @stacksofplates This would mean you are only pulling (and updating) using what is on github, and not something out of date (or broken).

                stacksofplatesS 1 Reply Last reply Reply Quote 0
                • stacksofplatesS
                  stacksofplates @DustinB3403
                  last edited by

                  @DustinB3403 said in A script to pull updates from GH or use History:

                  @stacksofplates This would mean you are only pulling (and updating) using what is on github, and not something out of date (or broken).

                  If you curl the update script daily in a cron job it would never be out of date. That's the only thing the cron job would do. Then you don't need a script to call a script.

                  1 Reply Last reply Reply Quote 1
                  • DanpD
                    Danp
                    last edited by

                    As we discussed in PM, I can't see why you need to write a script to download another script.

                    stacksofplatesS 1 Reply Last reply Reply Quote 0
                    • stacksofplatesS
                      stacksofplates @Danp
                      last edited by stacksofplates

                      @Danp said in A script to pull updates from GH or use History:

                      As we discussed in PM, I can't see why you need to write a script to download another script.

                      I can't see that either, but that's what we have here. The title is "a script to pull updates from GitHub". Is what's in the code section not a script? From everything in the original post it sounds like that's what is in the script he just didn't add #!/bin/bash

                      It's literally a script that runs curl and pipes it into Bash.

                      If you have a cron job

                      0 6 * * * root curl https://raw.githubusercontent.com/Jarli01/xenorchestra_updater/master/xo-update.sh -o /usr/local/bin/xo-update && chmod 755 /usr/local/bin/xo-update
                      

                      Now all you have to do is type xo-update. I don't see the point in having a script that downloads another script and pipes it into Bash.

                      1 Reply Last reply Reply Quote 0
                      • DustinB3403D
                        DustinB3403
                        last edited by

                        It's just a thought for the best approach to make sure you're using the most current update script

                        I know it's odd, but it's a simple process as well.

                        DanpD 1 Reply Last reply Reply Quote 1
                        • DanpD
                          Danp @DustinB3403
                          last edited by

                          @DustinB3403 I would think the best approach would be an auto-updating script. Haven't had time to research the possibilities there.

                          1 Reply Last reply Reply Quote 0
                          • DustinB3403D
                            DustinB3403
                            last edited by

                            So to clarify here, the goal is to allow admins an easy way to pull the most current update script. Not to run it for them on a set schedule.

                            (reason being is if we auto-force an update, and that update breaks their system, I don't want to have that on my mind)

                            stacksofplatesS 1 Reply Last reply Reply Quote 0
                            • JaredBuschJ
                              JaredBusch
                              last edited by gjacobse

                              Are you being intentionally dense you were told to automate the update of the script but don't execute the script the script is it executed just auto updates itself so the script is always up-to-date and available f*** it simple

                              1 Reply Last reply Reply Quote 1
                              • DustinB3403D
                                DustinB3403
                                last edited by

                                Yes, I'm allowed to be dense.

                                1 Reply Last reply Reply Quote 0
                                • stacksofplatesS
                                  stacksofplates @DustinB3403
                                  last edited by

                                  @DustinB3403 said in A script to pull updates from GH or use History:

                                  So to clarify here, the goal is to allow admins an easy way to pull the most current update script. Not to run it for them on a set schedule.

                                  (reason being is if we auto-force an update, and that update breaks their system, I don't want to have that on my mind)

                                  I don't understand the hangup here. The cron job I pasted above does not update anything. It doesn't run any scripts. It doesn't force anything. Where this is coming from I have no idea. It literally downloads a file (the xo-update script) and saves it on your disk under /usr/local/bin. IF you want to run it, you have to type xo-update, if you don't want to run it don't type it.

                                  Again, nothing is updating from a set schedule. It literally just saves the text of https://raw.githubusercontent.com/Jarli01/xenorchestra_updater/master/xo-update in a file. You have to MANUALLY run the script.

                                  DustinB3403D 1 Reply Last reply Reply Quote 2
                                  • DustinB3403D
                                    DustinB3403 @stacksofplates
                                    last edited by

                                    @stacksofplates said in A script to pull updates from GH or use History:

                                    @DustinB3403 said in A script to pull updates from GH or use History:

                                    So to clarify here, the goal is to allow admins an easy way to pull the most current update script. Not to run it for them on a set schedule.

                                    (reason being is if we auto-force an update, and that update breaks their system, I don't want to have that on my mind)

                                    I don't understand the hangup here. The cron job I pasted above does not update anything. It doesn't run any scripts. It doesn't force anything. Where this is coming from I have no idea.

                                    This is from sidebar conversations regarding the topic. It has nothing to do with the cron job you posted.

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      Jacob
                                      last edited by

                                      This post is deleted!
                                      1 Reply Last reply Reply Quote 0
                                      • 1 / 1
                                      • First post
                                        Last post