You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
524 B
31 lines
524 B
#! /usr/bin/env racket
|
|
#lang racket
|
|
|
|
(require bolt)
|
|
|
|
(define linode
|
|
(remote
|
|
#:host "linode"
|
|
#:user "wes"
|
|
#:key "/home/wes/.ssh/id_rsa.key"))
|
|
|
|
(define (test)
|
|
(with-cwd "gforth"
|
|
(exec "sudo whoami")
|
|
(with-cwd "src"
|
|
(pwd)
|
|
(ls)
|
|
(with-cwd "gforth-0.7.3"
|
|
(ls))))
|
|
(pwd)
|
|
(exec "cat /etc/passwd")
|
|
(become "http" (ls)))
|
|
|
|
; This is based on an entry in ~/.ssh/config
|
|
(with-host linode
|
|
(become "root"
|
|
(become "http"
|
|
(pwd)
|
|
(exec "ls /etc"))
|
|
(pwd))
|
|
(pwd))
|
|
|