public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-admin/puppetdb/files: puppetdb.initd
@ 2015-07-18  7:52 Matt Thode (prometheanfire)
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Thode (prometheanfire) @ 2015-07-18  7:52 UTC (permalink / raw
  To: gentoo-commits

prometheanfire    15/07/18 07:52:38

  Added:                puppetdb.initd
  Log:
  initial commit of puppetdb
  
  (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x33ED3FD25AFC78BA)

Revision  Changes    Path
1.1                  app-admin/puppetdb/files/puppetdb.initd

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd?rev=1.1&content-type=text/plain

Index: puppetdb.initd
===================================================================
#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd,v 1.1 2015/07/18 07:52:38 prometheanfire Exp $

extra_commands="checkconfig"

LOGDIR="/var/log/puppetlabs/puppetdb"
RUNDIR="/run/puppetlabs/puppetdb"

checkconfig() {
    if [ ! -x $JAVA_BIN ]; then
        eerror "Missing JAVA_BIN."
        eend 1
    fi
    if [ ! -d $INSTALL_DIR ]; then
        eerror "Missing INSTALL_DIR."
        eend 1
    fi
    if [ ! -a $BOOTSTRAP_CONFIG ]; then
        eerror "Missing BOOTSTRAP_CONFIG."
        eend 1
    fi
    if [ ! -e $CONFIG ]; then
        eerror "Missing CONFIG."
        eend 1
    fi
    if [ ! -n $USER ]; then
        eerror "Missing USER."
        eend 1
    fi
    if [ ! -n $GROUP ]; then
        eerror "Missing GROUP."
        eend 1
    fi

    checkpath -d -m 0700 -o "${USER}:${GROUP}" "${LOGDIR}"
    checkpath -d -m 0755 -o "${USER}:${GROUP}" "${RUNDIR}"

    JAVA_ARGS="${JAVA_ARGS} -cp '${INSTALL_DIR}/puppetdb.jar' clojure.main -m puppetlabs.puppetdb.main \
    --config ${CONFIG} -b '${BOOTSTRAP_CONFIG}'"

    EXEC="${JAVA_BIN} -XX:OnOutOfMemoryError=\"kill -9 %p\" -XX:+HeapDumpOnOutOfMemoryError \
    -XX:HeapDumpPath=/var/log/puppetlabs/puppetdb -Djava.security.egd=/dev/urandom ${JAVA_ARGS}"
}

start() {
    checkconfig || return 1

    daemon --user $USER --pidfile $PIDFILE "$EXEC >> /var/log/puppetlabs/puppetdb/puppetdb-daemon.log 2>&1 &"

    ebegin "Starting PuppetDB"
    start-stop-daemon --start -u "${USER}" -g "${GROUP}" \
        --exec ${EXEC} --pidfile "${RUNDIR}/puppetdb.pid" \
        -- >> "${LOGDIR}/puppetdb-daemon.log"
    local retval=$?
    if [ $retval -ne 0 ]; then
        ewarn "Error starting puppetdb."
    fi
    eend $retval
}

stop() {
    ebegin "Stopping PuppetDB"
    start-stop-daemon --stop --pidfile "${RUNDIR}/puppetdb.pid"
    eend $?
}





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-admin/puppetdb/files: puppetdb.initd
@ 2015-07-18  9:11 Matt Thode (prometheanfire)
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Thode (prometheanfire) @ 2015-07-18  9:11 UTC (permalink / raw
  To: gentoo-commits

prometheanfire    15/07/18 09:11:01

  Modified:             puppetdb.initd
  Log:
  hopefully final update
  
  (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x33ED3FD25AFC78BA)

Revision  Changes    Path
1.2                  app-admin/puppetdb/files/puppetdb.initd

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd?r1=1.1&r2=1.2

Index: puppetdb.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- puppetdb.initd	18 Jul 2015 07:52:38 -0000	1.1
+++ puppetdb.initd	18 Jul 2015 09:11:01 -0000	1.2
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd,v 1.1 2015/07/18 07:52:38 prometheanfire Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd,v 1.2 2015/07/18 09:11:01 prometheanfire Exp $
 
 extra_commands="checkconfig"
 
@@ -47,8 +47,6 @@
 start() {
     checkconfig || return 1
 
-    daemon --user $USER --pidfile $PIDFILE "$EXEC >> /var/log/puppetlabs/puppetdb/puppetdb-daemon.log 2>&1 &"
-
     ebegin "Starting PuppetDB"
     start-stop-daemon --start -u "${USER}" -g "${GROUP}" \
         --exec ${EXEC} --pidfile "${RUNDIR}/puppetdb.pid" \





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-admin/puppetdb/files: puppetdb.initd
@ 2015-07-20  5:41 Matt Thode (prometheanfire)
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Thode (prometheanfire) @ 2015-07-20  5:41 UTC (permalink / raw
  To: gentoo-commits

prometheanfire    15/07/20 05:41:49

  Modified:             puppetdb.initd
  Log:
  betterer init scripts... er
  
  (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x33ED3FD25AFC78BA)

Revision  Changes    Path
1.3                  app-admin/puppetdb/files/puppetdb.initd

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd?r1=1.2&r2=1.3

Index: puppetdb.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- puppetdb.initd	18 Jul 2015 09:11:01 -0000	1.2
+++ puppetdb.initd	20 Jul 2015 05:41:49 -0000	1.3
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd,v 1.2 2015/07/18 09:11:01 prometheanfire Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/puppetdb/files/puppetdb.initd,v 1.3 2015/07/20 05:41:49 prometheanfire Exp $
 
 extra_commands="checkconfig"
 
@@ -34,14 +34,13 @@
         eend 1
     fi
 
+    checkpath -d -m 0755 "${LOGDIR%/*}"
+    checkpath -d -m 0755 "${RUNDIR%/*}"
     checkpath -d -m 0700 -o "${USER}:${GROUP}" "${LOGDIR}"
     checkpath -d -m 0755 -o "${USER}:${GROUP}" "${RUNDIR}"
 
-    JAVA_ARGS="${JAVA_ARGS} -cp '${INSTALL_DIR}/puppetdb.jar' clojure.main -m puppetlabs.puppetdb.main \
-    --config ${CONFIG} -b '${BOOTSTRAP_CONFIG}'"
-
-    EXEC="${JAVA_BIN} -XX:OnOutOfMemoryError=\"kill -9 %p\" -XX:+HeapDumpOnOutOfMemoryError \
-    -XX:HeapDumpPath=/var/log/puppetlabs/puppetdb -Djava.security.egd=/dev/urandom ${JAVA_ARGS}"
+    JAVA_ARGS="${JAVA_ARGS} -cp '${INSTALL_DIR}/puppetdb.jar' clojure.main -m puppetlabs.puppetdb.main --config ${CONFIG} -b '${BOOTSTRAP_CONFIG}'"
+    EXEC="${JAVA_BIN} -XX:OnOutOfMemoryError=\"kill -9 %p\" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetlabs/puppetdb -Djava.security.egd=/dev/urandom ${JAVA_ARGS}"
 }
 
 start() {
@@ -49,8 +48,9 @@
 
     ebegin "Starting PuppetDB"
     start-stop-daemon --start -u "${USER}" -g "${GROUP}" \
-        --exec ${EXEC} --pidfile "${RUNDIR}/puppetdb.pid" \
-        -- >> "${LOGDIR}/puppetdb-daemon.log"
+        -m --pidfile "${RUNDIR}/puppetdb.pid" \
+        -b --exec "/bin/bash" \
+        -- -c "exec ${EXEC} >> ${LOGDIR}/daemon.log 2>&1"
     local retval=$?
     if [ $retval -ne 0 ]; then
         ewarn "Error starting puppetdb."





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-20  5:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-18  7:52 [gentoo-commits] gentoo-x86 commit in app-admin/puppetdb/files: puppetdb.initd Matt Thode (prometheanfire)
  -- strict thread matches above, loose matches on Subject: below --
2015-07-18  9:11 Matt Thode (prometheanfire)
2015-07-20  5:41 Matt Thode (prometheanfire)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox