From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Dan McGregor <dan.mcgregor@usask.ca>
Subject: Re: [meta-oe][PATCH] Add sysv init script for gateone.
Date: Fri, 7 Jun 2013 18:15:58 +0200 [thread overview]
Message-ID: <20130607161558.GH22710@jama> (raw)
In-Reply-To: <1370297720-9983-1-git-send-email-dan.mcgregor@usask.ca>
[-- Attachment #1: Type: text/plain, Size: 3614 bytes --]
On Mon, Jun 03, 2013 at 04:15:20PM -0600, Dan McGregor wrote:
> ---
Commit subject usually starts with name of changed component:
gateone: Add sysv init script
and missing SOB line, I've added both for you, so it's now in queue for
jenkins (no need to resend v2 unless someone else sends more review
comments).
> .../gateone/gateone/gateone-init | 47 ++++++++++++++++++++++
> .../recipes-connectivity/gateone/gateone_git.bb | 7 +++-
> 2 files changed, 53 insertions(+), 1 deletion(-)
> create mode 100644 meta-oe/recipes-connectivity/gateone/gateone/gateone-init
>
> diff --git a/meta-oe/recipes-connectivity/gateone/gateone/gateone-init b/meta-oe/recipes-connectivity/gateone/gateone/gateone-init
> new file mode 100644
> index 0000000..a1cf5ce
> --- /dev/null
> +++ b/meta-oe/recipes-connectivity/gateone/gateone/gateone-init
> @@ -0,0 +1,47 @@
> +#!/bin/sh -e
> +### BEGIN INIT INFO
> +# Provides: gateone
> +# Required-Start: networking
> +# Default-Start: 2 3 4 5
> +# Default-Stop: 0 1 6
> +# Short-Description: Gateone HTML5 ssh client
> +# Description: Gateone HTML5 terminal emulator and SSH client.
> +### END INIT INFO
> +
> +. /etc/init.d/functions
> +
> +NAME=gateone
> +DAEMON=/var/lib/gateone/gateone.py
> +PIDFILE=/var/run/gateone.pid
> +WORKDIR=/var/lib/gateone
> +
> +do_start() {
> + cd $WORKDIR
> + /usr/bin/python $DAEMON > /dev/null 2>&1 &
> + cd $OLDPWD
> +}
> +
> +do_stop() {
> + kill -TERM `cat $PIDFILE`
> +}
> +
> +case "$1" in
> + start)
> + echo "Starting gateone"
> + do_start
> + ;;
> + stop)
> + echo "Stopping gateone"
> + do_stop
> + ;;
> + restart|force-reload)
> + echo "Restart gateone"
> + do_stop
> + sleep 1
> + do_start
> + ;;
> + *)
> + echo "Usage: $0 {start|stop|restart|force-reload}" >&2
> + exit 1
> + ;;
> +esac
> diff --git a/meta-oe/recipes-connectivity/gateone/gateone_git.bb b/meta-oe/recipes-connectivity/gateone/gateone_git.bb
> index e5b8527..85c32cc 100644
> --- a/meta-oe/recipes-connectivity/gateone/gateone_git.bb
> +++ b/meta-oe/recipes-connectivity/gateone/gateone_git.bb
> @@ -10,11 +10,12 @@ SRC_URI = "git://github.com/liftoff/GateOne.git \
> file://gateone-avahi.service \
> file://server.conf \
> file://gateone.service \
> + file://gateone-init \
> "
>
> S = "${WORKDIR}/git"
>
> -inherit distutils allarch python-dir systemd
> +inherit distutils allarch python-dir systemd update-rc.d
>
> export prefix = "${localstatedir}/lib"
>
> @@ -28,6 +29,9 @@ do_install_append() {
>
> install -d ${D}${systemd_unitdir}/system
> install -m 0644 ${WORKDIR}/gateone.service ${D}${systemd_unitdir}/system
> +
> + install -d ${D}${sysconfdir}/init.d
> + install -m 0755 ${WORKDIR}/gateone-init ${D}${sysconfdir}/init.d/gateone
> }
>
> FILES_${PN} = "${localstatedir}/lib ${localstatedir}/log ${localstatedir}/volatile/log ${base_libdir} ${sysconfdir} ${PYTHON_SITEPACKAGES_DIR}"
> @@ -63,3 +67,4 @@ RDEPENDS_${PN} = "file \
> "
>
> SYSTEMD_SERVICE_${PN} = "gateone.service"
> +INITSCRIPT_NAME = "gateone"
> --
> 1.8.1.4
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
prev parent reply other threads:[~2013-06-07 16:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 22:15 [meta-oe][PATCH] Add sysv init script for gateone Dan McGregor
2013-06-07 16:15 ` Martin Jansa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130607161558.GH22710@jama \
--to=martin.jansa@gmail.com \
--cc=dan.mcgregor@usask.ca \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox