A script to pull updates from GH or use History



  • So with XO and the update script, working on it locally is fine and all, but for the populace, a script which goes out and pulls the most current script from GH seems reasonable.

    Something like

    #A simple script to hit github and pull the most recent updates.
    sudo curl https://raw.githubusercontent.com/Jarli01/xenorchestra_updater/master/xo-update.sh | bash


  • 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.



  • Why not just have a cron job that runs daily?



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

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



  • 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.



  • @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.



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



  • @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.



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



  • @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.



  • 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.



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



  • 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)


  • Service Provider

    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 fuck it simple



  • Yes, I'm allowed to be dense.



  • @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.



  • @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.



  • This post is deleted!


Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.