Skip to content

Instantly share code, notes, and snippets.

@MatheusMuriel
Created August 13, 2020 16:23
Show Gist options
  • Save MatheusMuriel/3c0d9e54815d6162702b233b97de7de2 to your computer and use it in GitHub Desktop.
Save MatheusMuriel/3c0d9e54815d6162702b233b97de7de2 to your computer and use it in GitHub Desktop.
require 'sinatra'
require 'fileutils'
set :port, 6000
diretorio_repo = '/home/Muriel/JarvisBot/'
post '/jarvis' do
system('systemctl stop jarvisbot.service')
FileUtils.cd(diretorio_repo) do
system('git pull --rebase')
end
system('systemctl start jarvisbot.service')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment