]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
cfengine3 mode: bind cfengine_update_testing.sh to C-c t
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 27 Aug 2014 16:14:38 +0000 (18:14 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 27 Aug 2014 16:14:38 +0000 (18:14 +0200)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba.org

diff --git a/bba.org b/bba.org
index 5868cc787fec3dded423fb793c27563d74860410..73791bdb896bb3a2b92960b862f99d13e47ba1b1 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -605,6 +605,7 @@ javascript:location.href='org-protocol://capture:/l/'%20+%20encodeURIComponent(l
   (add-hook 'cfengine3-mode-hook
     (lambda ()
       (define-key cfengine3-mode-map "\C-cb" 'cfe-insert-bundle)
+      (define-key cfengine3-mode-map "\C-ct" (lambda() (interactive) (shell-command "~/bin/cfengine_update_testing.sh" )))
       (define-key cfengine3-mode-map "\C-cu" 'cfe-config-adduser-ldap)
       (define-key cfengine3-mode-map "\C-c\C-c" 'compile)
       ))
@@ -612,6 +613,39 @@ javascript:location.href='org-protocol://capture:/l/'%20+%20encodeURIComponent(l
   
 #+END_SRC
 
+for C-c t you can use a file like this one:
+
+#+NAME: ~/bin/cfengine_update_testing.sh
+#+BEGIN_SRC sh
+  #!/bin/bash
+  :<<cut
+  =cut
+  
+  =pod
+  
+  =head1 NAME
+  
+  cfengine_update_testing
+  
+  =head1 DESCRIPTION
+  
+  sync cfengine inputs to agtest03 and run failsafe.
+  
+  =cut
+  
+  cf-promises -D customlib_active || exit 3
+  rsync -av --progress --delete -e ssh ~/.cfagent/inputs/ agtest03:/var/cfengine/masterfiles/
+  ssh agtest03 "/usr/local/sbin/cf-agent -f /var/cfengine/inputs/failsafe.cf"
+  
+  :<<=cut
+  
+  =head1 AUTHOR
+  
+  Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
+  
+  =cut
+#+END_SRC
+
 *** mwheel
 
 #+BEGIN_SRC emacs-lisp