[ARVADOS] created: f210df337fb4ce2cefd190e821c0687e71abe46a

git at public.curoverse.com git at public.curoverse.com
Fri Oct 2 11:21:11 EDT 2015


        at  f210df337fb4ce2cefd190e821c0687e71abe46a (commit)


commit f210df337fb4ce2cefd190e821c0687e71abe46a
Author: Nico Cesar <nico at curoverse.com>
Date:   Fri Oct 2 11:15:21 2015 -0400

    6034: debian7 sysv initscript support for keepproxy
    
    refs #6034

diff --git a/services/keepproxy/pkg-extras/after-install-debian7 b/services/keepproxy/pkg-extras/after-install-debian7
new file mode 100755
index 0000000..c365a99
--- /dev/null
+++ b/services/keepproxy/pkg-extras/after-install-debian7
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in 
+	upgrade)
+	;;
+
+	install)
+	;;
+
+	configure)
+	if [ -x "/etc/init.d/keepproxy" ]; then
+		update-rc.d keepproxy defaults >/dev/null || exit $?
+		invoke-rc.d keepproxy start || exit $?
+	fi
+	;;
+
+        abort-upgrade|abort-remove|abort-deconfigure)
+        ;;
+
+	*)
+	echo "$0 called with unknown argument '$1'" >&2
+	exit 1
+	;;
+esac
diff --git a/services/keepproxy/pkg-extras/etc/default/keepproxy b/services/keepproxy/pkg-extras/etc/default/keepproxy
index ddcab10..1f953b2 100644
--- a/services/keepproxy/pkg-extras/etc/default/keepproxy
+++ b/services/keepproxy/pkg-extras/etc/default/keepproxy
@@ -4,4 +4,5 @@ chroot="/"
 chdir="/"
 nice=""
 args="-listen=':9100'"
-
+ARVADOS_API_HOST="" 
+ARVADOS_API_TOKEN=""
diff --git a/services/keepproxy/pkg-extras/etc/init.d/keepproxy b/services/keepproxy/pkg-extras/etc/init.d/keepproxy
index 7bb35b9..4caa5c8 100755
--- a/services/keepproxy/pkg-extras/etc/init.d/keepproxy
+++ b/services/keepproxy/pkg-extras/etc/init.d/keepproxy
@@ -44,12 +44,9 @@ start() {
 
 
   # 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 &
diff --git a/services/keepproxy/pkg-extras/etc/init.d/keepproxy b/services/keepproxy/pkg-extras/examples/keepproxy-sysv-initscript
similarity index 100%
copy from services/keepproxy/pkg-extras/etc/init.d/keepproxy
copy to services/keepproxy/pkg-extras/examples/keepproxy-sysv-initscript

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list