# Looking up available upgrades via CLI

**URL:** <https://meta.discourse.org/t/looking-up-available-upgrades-via-cli/68330>\
**Category:** Self-hosting\
**Tags:** hosting\
**Created:** [18.Август.2017 18:05:04 UTC](https://meta.discourse.org/t/looking-up-available-upgrades-via-cli/68330 "2017-08-18T18:05:04Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![simonclausen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simonclausen/32/120774_2.png) [@simonclausen](https://meta.discourse.org/u/simonclausen)\
**Post date:** [18.Август.2017 18:05:05 UTC](https://meta.discourse.org/t/looking-up-available-upgrades-via-cli/68330/1 "2017-08-18T18:05:05Z")

</div>

I’m looking at automating upgrades of discourse. This is for the most basic single container install. Trying to keep things simple.

The most basic would be to setup up this to run via cron:

```plaintext
cd /var/discourse
git pull
./launcher rebuild app

```

Problem is you take the service offline for the rebuild even if there are no updates.

I’d preferebly like to do something like this:

```plaintext
if ./update_available.sh; then
  cd /var/discourse
  git pull
  ./launcher rebuild app
fi

```

(assuming the script exits with true if updates are available)

Anyone know of any easy methods to get this info on the host?

Thanks!

---

_[View the full topic](https://meta.discourse.org/t/looking-up-available-upgrades-via-cli/68330)._
