diff options
author | Eduardo Silva <eduardo@monkey.io> | 2014-07-12 00:37:57 -0600 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-08-01 14:25:01 +0200 |
commit | 74b25f04468aeac2ee5e11aa3ca037e1dbebe70c (patch) | |
tree | 806e4136b57b4dab7d0a74317ea1bb51745bf59c /meta-webserver | |
parent | 31577e783a86cc357ab4838cf14bc16fbe5bea83 (diff) | |
download | ast2050-yocto-openembedded-74b25f04468aeac2ee5e11aa3ca037e1dbebe70c.zip ast2050-yocto-openembedded-74b25f04468aeac2ee5e11aa3ca037e1dbebe70c.tar.gz |
monkey: new v1.5.1 release.
This patch add the minor release fix of Monkey HTTP Server v1.5.1. It fixes
some problems when switching user when started as root.
Signed-off-by: Eduardo Silva <eduardo@monkey.io>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-webserver')
-rw-r--r-- | meta-webserver/recipes-httpd/monkey/files/monkey.init | 34 | ||||
-rw-r--r-- | meta-webserver/recipes-httpd/monkey/files/monkey.service | 12 | ||||
-rw-r--r-- | meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb (renamed from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb) | 28 |
3 files changed, 67 insertions, 7 deletions
diff --git a/meta-webserver/recipes-httpd/monkey/files/monkey.init b/meta-webserver/recipes-httpd/monkey/files/monkey.init new file mode 100644 index 0000000..40b2118 --- /dev/null +++ b/meta-webserver/recipes-httpd/monkey/files/monkey.init @@ -0,0 +1,34 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/bin/monkey +NAME=monkey +DESC="Monkey HTTP Server" +OPTS="--daemon" + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start -x "$DAEMON" -- $OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop -x "$DAEMON" + echo "$NAME." + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon --stop -x "$DAEMON" + sleep 1 + start-stop-daemon --start -x "$DAEMON" -- $OPTS + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/meta-webserver/recipes-httpd/monkey/files/monkey.service b/meta-webserver/recipes-httpd/monkey/files/monkey.service new file mode 100644 index 0000000..f9aa57f --- /dev/null +++ b/meta-webserver/recipes-httpd/monkey/files/monkey.service @@ -0,0 +1,12 @@ +[Unit] +Description=Monkey HTTP Server +After=network.target remote-fs.target + +[Service] +Type=forking +ExecStart=/usr/bin/monkey --daemon +PIDFile=/var/run/monkey.pid.2001 +TimeoutSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb b/meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb index 6fa1b77..2de98f4 100644 --- a/meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb +++ b/meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb @@ -7,22 +7,24 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" SECTION = "net" -SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz" -SRC_URI[md5sum] = "9123fc371334621fde1c060ab17adcd3" -SRC_URI[sha256sum] = "f7a5e4839822750930a723f63a4edbf700e0fb8299a4b3637bd8bab5b1d098a7" +SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz \ + file://monkey.service \ + file://monkey.init" + +SRC_URI[md5sum] = "2fe04135728f5c3a86c3a412059e0da3" +SRC_URI[sha256sum] = "28dfc5e57bbcd305727e7af6a1a0587868db1c1286498757bfeb72edddf457e7" EXTRA_OECONF = " \ --plugdir=${libdir}/monkey/ \ --logdir=${localstatedir}/log/monkey/ \ --pidfile=${localstatedir}/run/monkey.pid \ --default-user=www-data \ - --datadir= ${localstatedir}/www/monkey/ \ + --datadir=${localstatedir}/www/monkey/ \ --sysconfdir=${sysconfdir}/monkey/ \ --enable-plugins=* \ --disable-plugins=polarssl \ --debug \ - --malloc-libc \ -" + --malloc-libc" inherit autotools-brokensep pkgconfig update-rc.d systemd @@ -33,4 +35,16 @@ SYSTEMD_SERVICE_${PN} = "monkey.service" FILES_${PN} += "${localstatedir}/www/monkey/" -CONFFILES_${PN} = "${sysconfdir}/monkey/" +# temporarily remove, because ipk doesn't allow directories in CONFFILES +# CONFFILES_${PN} = "${sysconfdir}/monkey/" + +do_install_append() { + + mkdir -p ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey + + if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system + fi +} |