------------------------------------------------------------
revno: 65
committer: Dimitri John Ledkov <[email protected]>
branch nick: upstart-jobs
timestamp: Tue 2014-04-15 12:09:43 +0100
message:
  auto update
removed:
  etc/init/cgmanager.override
  etc/init/cgproxy.override
kind changed:
  etc/init.d/hockeypuck@ (symlink => file)
modified:
  etc/init/cgmanager.conf
  etc/init/cgproxy.conf
  etc/init/hockeypuck.conf
  etc/init/lxc-android-config.conf
  etc/init/systemd-logind.conf


--
lp:~upstart-devel/upstart/upstart-jobs
https://code.launchpad.net/~upstart-devel/upstart/upstart-jobs

Your team Upstart Reviewers is subscribed to branch 
lp:~upstart-devel/upstart/upstart-jobs.
To unsubscribe from this branch go to 
https://code.launchpad.net/~upstart-devel/upstart/upstart-jobs/+edit-subscription
=== modified symlink 'etc/init.d/hockeypuck' (properties changed: -x to +x)
=== target was u'/lib/init/upstart-job'
--- etc/init.d/hockeypuck	1970-01-01 00:00:00 +0000
+++ etc/init.d/hockeypuck	2014-04-15 11:09:43 +0000
@@ -0,0 +1,158 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          hockeypuck
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Hockeypuck
+# Description:       Hockeypuck is an OpenPGP Keyserver.
+### END INIT INFO
+
+# Author: Casey Marshall <[email protected]>
+#
+# Please remove the "Author" lines above and replace them
+# with your own name if you copy and modify this script.
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Hockeypuck OpenPGP Keyserver"
+NAME=hockeypuck
+DAEMON=/usr/bin/hockeypuck
+DAEMON_ARGS="run --config /etc/hockeypuck/hockeypuck.conf"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	# Many daemons don't delete their pidfiles when they exit.
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+	#
+	# If the daemon can reload its configuration without
+	# restarting (for example, when it is sent a SIGHUP),
+	# then implement that here.
+	#
+	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+	return 0
+}
+
+case "$1" in
+  start)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  stop)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  status)
+	status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+	;;
+  #reload|force-reload)
+	#
+	# If do_reload() is not implemented then leave this commented out
+	# and leave 'force-reload' as an alias for 'restart'.
+	#
+	#log_daemon_msg "Reloading $DESC" "$NAME"
+	#do_reload
+	#log_end_msg $?
+	#;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+		# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:

=== modified file 'etc/init/cgmanager.conf'
--- etc/init/cgmanager.conf	2014-04-05 11:07:46 +0000
+++ etc/init/cgmanager.conf	2014-04-15 11:09:43 +0000
@@ -8,6 +8,7 @@
 # prior to saucy, we would need to start on mounted
 # MOUNTPOINT=/sys, and mount /sys/fs/cgroup ourselves
 start on mounted MOUNTPOINT=/sys/fs/cgroup or virtual-filesystems
+stop on runlevel [06]
 
 # to get debug output into /var/log/upstart/cgmanager.log, create/edit
 # /etc/default/cgmanager and set cgmanager_opts="--debug"

=== removed file 'etc/init/cgmanager.override'
--- etc/init/cgmanager.override	2014-04-05 11:07:46 +0000
+++ etc/init/cgmanager.override	1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-manual

=== modified file 'etc/init/cgproxy.conf'
--- etc/init/cgproxy.conf	2014-04-05 11:07:46 +0000
+++ etc/init/cgproxy.conf	2014-04-15 11:09:43 +0000
@@ -9,6 +9,7 @@
 # prior to saucy, we would need to start on mounted
 # MOUNTPOINT=/sys, and mount /sys/fs/cgroup ourselves
 start on started cgmanager
+stop on runlevel [06]
 
 # to get debug output into /var/log/upstart/cgproxy.log, create/edit
 # /etc/default/cgmanager and set cgmanager_opts="--debug"

=== removed file 'etc/init/cgproxy.override'
--- etc/init/cgproxy.override	2014-04-05 11:07:46 +0000
+++ etc/init/cgproxy.override	1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-manual

=== modified file 'etc/init/hockeypuck.conf'
--- etc/init/hockeypuck.conf	2013-11-18 12:42:03 +0000
+++ etc/init/hockeypuck.conf	2014-04-15 11:09:43 +0000
@@ -1,10 +1,10 @@
 # hockeypuck - ubuntu upstart file
 
-description "Hockeypuck (MongoDB) OpenPGP Key Server"
-author "casey.marshall <[email protected]>"
+description "Hockeypuck OpenPGP Keyserver"
+author "Casey Marshall <[email protected]>"
 
-start on (runlevel [2345] and started mongodb)
-stop on (runlevel [016] or stopping mongodb)
+start on (runlevel [2345] and started postgresql)
+stop on (runlevel [016] or stopping postgresql)
 
 # Automatically restart process if crashed
 respawn
@@ -12,4 +12,4 @@
 setuid hockeypuck
 
 # Start the process
-exec /usr/bin/hockeypuck-mgo
+exec /usr/bin/hockeypuck run --config /etc/hockeypuck/hockeypuck.conf

=== modified file 'etc/init/lxc-android-config.conf'
--- etc/init/lxc-android-config.conf	2014-04-05 11:07:46 +0000
+++ etc/init/lxc-android-config.conf	2014-04-15 11:09:43 +0000
@@ -4,7 +4,7 @@
 
 description	"lxc android config and container initialization"
 
-start on started cgroup-lite
+start on cgmanager-ready
 stop on runlevel [06]
 
 emits android
@@ -16,7 +16,7 @@
 post-start script
     if [ ! -d /dev/cpuctl ] && [ -d /sys/fs/cgroup/cpu ]; then
         mkdir /dev/cpuctl
-        mount --bind /sys/fs/cgroup/cpu /dev/cpuctl
+        mount -t cgroup -o cpu none /sys/fs/cgroup/cpu
     fi
 
     lxc-wait -n android -s RUNNING -t 30

=== modified file 'etc/init/systemd-logind.conf'
--- etc/init/systemd-logind.conf	2014-04-11 11:10:05 +0000
+++ etc/init/systemd-logind.conf	2014-04-15 11:09:43 +0000
@@ -3,8 +3,6 @@
 start on started dbus
 stop on stopping dbus
 
-limit nofile 16384 16384
-
 respawn
 
 env SYSTEMD_LOG_TARGET=syslog
@@ -27,4 +25,11 @@
     fi
 end script
 
-exec /lib/systemd/systemd-logind
+script
+    # Don't use the limit stanza as failure to set the limit (unprivileged
+    # containers for example) causes a complete failure to start the job.
+    ulimit -S -n 16384 || true
+    ulimit -H -n 16384 || true
+
+    exec /lib/systemd/systemd-logind
+end script

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to