[ARVADOS] updated: 8cc05ab487c8a0b6536b305880b724573aafc4d2

git at public.curoverse.com git at public.curoverse.com
Wed Oct 7 09:58:14 EDT 2015


Summary of changes:
 .../keepproxy/pkg-extras/after-install-debian7     |  2 +-
 .../keepproxy/pkg-extras/etc/default/keepproxy     |  2 +-
 services/keepproxy/pkg-extras/etc/init.d/keepproxy | 20 +++++++++--------
 .../pkg-extras/examples/keepproxy-sysv-initscript  | 25 +++++++++++-----------
 4 files changed, 25 insertions(+), 24 deletions(-)

       via  8cc05ab487c8a0b6536b305880b724573aafc4d2 (commit)
       via  4b0da16e47b87f3c99112e0652779ea56273daea (commit)
       via  740766871751160a636ca0e1425afc09c690d11d (commit)
       via  2092349ca95934b0b62359eff16859fd1930606f (commit)
      from  f210df337fb4ce2cefd190e821c0687e71abe46a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 8cc05ab487c8a0b6536b305880b724573aafc4d2
Author: Nico Cesar <nico at curoverse.com>
Date:   Tue Oct 6 11:34:54 2015 -0400

    6034: copy init.d script example with the working one.
    
    refs #6034

diff --git a/services/keepproxy/pkg-extras/examples/keepproxy-sysv-initscript b/services/keepproxy/pkg-extras/examples/keepproxy-sysv-initscript
index 7bb35b9..4fcc2c6 100755
--- a/services/keepproxy/pkg-extras/examples/keepproxy-sysv-initscript
+++ b/services/keepproxy/pkg-extras/examples/keepproxy-sysv-initscript
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Init script for keepproxy
-# Maintained by 
+# Maintained by Nico Cesar <nico at curoverse.com>
 # Generated by pleaserun.
 # Implemented based on LSB Core 3.1:
 #   * Sections: 20.2, 20.3
@@ -11,7 +11,7 @@
 # Required-Stop:     $remote_fs $syslog
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
-# Short-Description: 
+# Short-Description:
 # Description:       no description given
 ### END INIT INFO
 
@@ -36,20 +36,19 @@ emit() {
 }
 
 start() {
+  if [ "x$ARVADOS_API_HOST" = "x" -o "x$ARVADOS_API_TOKEN" = "x" ]
+  then
+    echo  ARVADOS_API_HOST and ARVADOS_API_TOKEN must be set! check /etc/default/keepproxy or /etc/sysconfig/keepproxy
+    return 1
+  fi
 
   # Ensure the log directory is setup correctly.
   [ ! -d "/var/log/" ] && mkdir "/var/log/"
   chown "$user":"$group" "/var/log/"
   chmod 755 "/var/log/"
 
-
-  # Setup any environmental stuff beforehand
-  
-
   # Run the program!
-  
-  chroot --userspec "$user":"$group" "$chroot" sh -c "
-    
+  chroot --userspec "$user":"$group" "$chroot" /usr/bin/env -i ARVADOS_API_HOST="$ARVADOS_API_HOST" ARVADOS_API_TOKEN="$ARVADOS_API_TOKEN" sh -c "
     cd \"$chdir\"
     exec \"$program\" $args
   " >> /var/log/keepproxy.stdout 2>> /var/log/keepproxy.stderr &
@@ -133,7 +132,7 @@ case "$1" in
     ;;
   stop) stop ;;
   force-stop) force_stop ;;
-  status) 
+  status)
     status
     code=$?
     if [ $code -eq 0 ] ; then
@@ -143,9 +142,9 @@ case "$1" in
     fi
     exit $code
     ;;
-  restart) 
-    
-    stop && start 
+  restart)
+
+    stop && start
     ;;
   *)
     echo "Usage: $SCRIPTNAME {start|force-start|stop|force-start|force-stop|status|restart}" >&2

commit 4b0da16e47b87f3c99112e0652779ea56273daea
Author: Nico Cesar <nico at curoverse.com>
Date:   Tue Oct 6 11:33:02 2015 -0400

    6034: more trailing whitespaces
    
    refs #6034

diff --git a/services/keepproxy/pkg-extras/etc/init.d/keepproxy b/services/keepproxy/pkg-extras/etc/init.d/keepproxy
index ccfe431..4fcc2c6 100755
--- a/services/keepproxy/pkg-extras/etc/init.d/keepproxy
+++ b/services/keepproxy/pkg-extras/etc/init.d/keepproxy
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Init script for keepproxy
-# Maintained by 
+# Maintained by Nico Cesar <nico at curoverse.com>
 # Generated by pleaserun.
 # Implemented based on LSB Core 3.1:
 #   * Sections: 20.2, 20.3
@@ -11,7 +11,7 @@
 # Required-Stop:     $remote_fs $syslog
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
-# Short-Description: 
+# Short-Description:
 # Description:       no description given
 ### END INIT INFO
 
@@ -38,7 +38,7 @@ emit() {
 start() {
   if [ "x$ARVADOS_API_HOST" = "x" -o "x$ARVADOS_API_TOKEN" = "x" ]
   then
-    echo  ARVADOS_API_HOST and ARVADOS_API_TOKEN must be set! check /etc/default/keepproxy or /etc/sysconfig/keepproxy 
+    echo  ARVADOS_API_HOST and ARVADOS_API_TOKEN must be set! check /etc/default/keepproxy or /etc/sysconfig/keepproxy
     return 1
   fi
 
@@ -47,9 +47,6 @@ start() {
   chown "$user":"$group" "/var/log/"
   chmod 755 "/var/log/"
 
-
-  # Setup any environmental stuff beforehand
-
   # Run the program!
   chroot --userspec "$user":"$group" "$chroot" /usr/bin/env -i ARVADOS_API_HOST="$ARVADOS_API_HOST" ARVADOS_API_TOKEN="$ARVADOS_API_TOKEN" sh -c "
     cd \"$chdir\"
@@ -135,7 +132,7 @@ case "$1" in
     ;;
   stop) stop ;;
   force-stop) force_stop ;;
-  status) 
+  status)
     status
     code=$?
     if [ $code -eq 0 ] ; then
@@ -145,9 +142,9 @@ case "$1" in
     fi
     exit $code
     ;;
-  restart) 
-    
-    stop && start 
+  restart)
+
+    stop && start
     ;;
   *)
     echo "Usage: $SCRIPTNAME {start|force-start|stop|force-start|force-stop|status|restart}" >&2

commit 740766871751160a636ca0e1425afc09c690d11d
Author: Nico Cesar <nico at curoverse.com>
Date:   Tue Oct 6 11:30:12 2015 -0400

    6034: deleted trailing whitespaces
    
    refs 6034

diff --git a/services/keepproxy/pkg-extras/after-install-debian7 b/services/keepproxy/pkg-extras/after-install-debian7
index c365a99..17f01aa 100755
--- a/services/keepproxy/pkg-extras/after-install-debian7
+++ b/services/keepproxy/pkg-extras/after-install-debian7
@@ -2,7 +2,7 @@
 
 set -e
 
-case "$1" in 
+case "$1" in
 	upgrade)
 	;;
 
diff --git a/services/keepproxy/pkg-extras/etc/default/keepproxy b/services/keepproxy/pkg-extras/etc/default/keepproxy
index 1f953b2..c0aa113 100644
--- a/services/keepproxy/pkg-extras/etc/default/keepproxy
+++ b/services/keepproxy/pkg-extras/etc/default/keepproxy
@@ -4,5 +4,5 @@ chroot="/"
 chdir="/"
 nice=""
 args="-listen=':9100'"
-ARVADOS_API_HOST="" 
+ARVADOS_API_HOST=""
 ARVADOS_API_TOKEN=""

commit 2092349ca95934b0b62359eff16859fd1930606f
Author: Nico Cesar <nico at curoverse.com>
Date:   Tue Oct 6 11:27:36 2015 -0400

    6034: added checks for keepproxy's needed env variables
    
    refs #6034

diff --git a/services/keepproxy/pkg-extras/etc/init.d/keepproxy b/services/keepproxy/pkg-extras/etc/init.d/keepproxy
index 4caa5c8..ccfe431 100755
--- a/services/keepproxy/pkg-extras/etc/init.d/keepproxy
+++ b/services/keepproxy/pkg-extras/etc/init.d/keepproxy
@@ -36,6 +36,11 @@ emit() {
 }
 
 start() {
+  if [ "x$ARVADOS_API_HOST" = "x" -o "x$ARVADOS_API_TOKEN" = "x" ]
+  then
+    echo  ARVADOS_API_HOST and ARVADOS_API_TOKEN must be set! check /etc/default/keepproxy or /etc/sysconfig/keepproxy 
+    return 1
+  fi
 
   # Ensure the log directory is setup correctly.
   [ ! -d "/var/log/" ] && mkdir "/var/log/"

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list