Module: Webbynode::Updater

Included in:
Commands::Apps, Commands::Push
Defined in:
lib/webbynode/updater.rb

Instance Method Summary collapse

Instance Method Details

#check_for_updatesObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/webbynode/updater.rb', line 3

def check_for_updates
  updated = remote_executor.exec(<<-EOS, false, true)
  if [ ! -f /var/webbynode/update_rapp ]; then
    cd /var/webbynode
    wget http://repo.webbynode.com/rapidapps/update_rapp
    chmod +x update_rapp
    ln -s -f /var/webbynode/update_rapp /usr/bin/update_rapp
  fi

  /var/webbynode/update_rapp
  if [ $? -eq 1 ]; then exit 1; fi
  EOS

  updated == 1
end