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 | meta-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 000000000..40b21182e --- /dev/null +++ b/meta-webserver/recipes-httpd/monkey/files/monkey.init | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
4 | DAEMON=/usr/bin/monkey | ||
5 | NAME=monkey | ||
6 | DESC="Monkey HTTP Server" | ||
7 | OPTS="--daemon" | ||
8 | |||
9 | case "$1" in | ||
10 | start) | ||
11 | echo -n "Starting $DESC: " | ||
12 | start-stop-daemon --start -x "$DAEMON" -- $OPTS | ||
13 | echo "$NAME." | ||
14 | ;; | ||
15 | stop) | ||
16 | echo -n "Stopping $DESC: " | ||
17 | start-stop-daemon --stop -x "$DAEMON" | ||
18 | echo "$NAME." | ||
19 | ;; | ||
20 | restart|force-reload) | ||
21 | echo -n "Restarting $DESC: " | ||
22 | start-stop-daemon --stop -x "$DAEMON" | ||
23 | sleep 1 | ||
24 | start-stop-daemon --start -x "$DAEMON" -- $OPTS | ||
25 | echo "$NAME." | ||
26 | ;; | ||
27 | *) | ||
28 | N=/etc/init.d/$NAME | ||
29 | echo "Usage: $N {start|stop|restart|force-reload}" >&2 | ||
30 | exit 1 | ||
31 | ;; | ||
32 | esac | ||
33 | |||
34 | 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 000000000..f9aa57f91 --- /dev/null +++ b/meta-webserver/recipes-httpd/monkey/files/monkey.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=Monkey HTTP Server | ||
3 | After=network.target remote-fs.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | ExecStart=/usr/bin/monkey --daemon | ||
8 | PIDFile=/var/run/monkey.pid.2001 | ||
9 | TimeoutSec=10 | ||
10 | |||
11 | [Install] | ||
12 | 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 6fa1b77e1..2de98f453 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" | |||
7 | 7 | ||
8 | SECTION = "net" | 8 | SECTION = "net" |
9 | 9 | ||
10 | SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz" | 10 | SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz \ |
11 | SRC_URI[md5sum] = "9123fc371334621fde1c060ab17adcd3" | 11 | file://monkey.service \ |
12 | SRC_URI[sha256sum] = "f7a5e4839822750930a723f63a4edbf700e0fb8299a4b3637bd8bab5b1d098a7" | 12 | file://monkey.init" |
13 | |||
14 | SRC_URI[md5sum] = "2fe04135728f5c3a86c3a412059e0da3" | ||
15 | SRC_URI[sha256sum] = "28dfc5e57bbcd305727e7af6a1a0587868db1c1286498757bfeb72edddf457e7" | ||
13 | 16 | ||
14 | EXTRA_OECONF = " \ | 17 | EXTRA_OECONF = " \ |
15 | --plugdir=${libdir}/monkey/ \ | 18 | --plugdir=${libdir}/monkey/ \ |
16 | --logdir=${localstatedir}/log/monkey/ \ | 19 | --logdir=${localstatedir}/log/monkey/ \ |
17 | --pidfile=${localstatedir}/run/monkey.pid \ | 20 | --pidfile=${localstatedir}/run/monkey.pid \ |
18 | --default-user=www-data \ | 21 | --default-user=www-data \ |
19 | --datadir= ${localstatedir}/www/monkey/ \ | 22 | --datadir=${localstatedir}/www/monkey/ \ |
20 | --sysconfdir=${sysconfdir}/monkey/ \ | 23 | --sysconfdir=${sysconfdir}/monkey/ \ |
21 | --enable-plugins=* \ | 24 | --enable-plugins=* \ |
22 | --disable-plugins=polarssl \ | 25 | --disable-plugins=polarssl \ |
23 | --debug \ | 26 | --debug \ |
24 | --malloc-libc \ | 27 | --malloc-libc" |
25 | " | ||
26 | 28 | ||
27 | inherit autotools-brokensep pkgconfig update-rc.d systemd | 29 | inherit autotools-brokensep pkgconfig update-rc.d systemd |
28 | 30 | ||
@@ -33,4 +35,16 @@ SYSTEMD_SERVICE_${PN} = "monkey.service" | |||
33 | 35 | ||
34 | FILES_${PN} += "${localstatedir}/www/monkey/" | 36 | FILES_${PN} += "${localstatedir}/www/monkey/" |
35 | 37 | ||
36 | CONFFILES_${PN} = "${sysconfdir}/monkey/" | 38 | # temporarily remove, because ipk doesn't allow directories in CONFFILES |
39 | # CONFFILES_${PN} = "${sysconfdir}/monkey/" | ||
40 | |||
41 | do_install_append() { | ||
42 | |||
43 | mkdir -p ${D}${sysconfdir}/init.d | ||
44 | install -m 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey | ||
45 | |||
46 | if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
47 | install -d ${D}${systemd_unitdir}/system | ||
48 | install -m 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system | ||
49 | fi | ||
50 | } | ||