diff options
| author | Roy Li <rongqing.li@windriver.com> | 2015-02-09 10:39:20 +0800 |
|---|---|---|
| committer | Joe MacDonald <joe_macdonald@mentor.com> | 2015-02-11 21:25:41 -0500 |
| commit | de5d7d91baba0d621633746072f3c04fdf8fb7ef (patch) | |
| tree | cb39e15a9c8693e33414b34b2f74c15071724a5d /meta-networking/recipes-daemons/proftpd | |
| parent | 2166c638b497010bfc51cb3d04581ae35c8a8e11 (diff) | |
| download | meta-openembedded-de5d7d91baba0d621633746072f3c04fdf8fb7ef.tar.gz | |
proftpd: add systemd support
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-daemons/proftpd')
| -rw-r--r-- | meta-networking/recipes-daemons/proftpd/files/proftpd.service | 7 | ||||
| -rw-r--r-- | meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb | 13 |
2 files changed, 19 insertions, 1 deletions
diff --git a/meta-networking/recipes-daemons/proftpd/files/proftpd.service b/meta-networking/recipes-daemons/proftpd/files/proftpd.service new file mode 100644 index 0000000000..ba97f8e1ca --- /dev/null +++ b/meta-networking/recipes-daemons/proftpd/files/proftpd.service | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=proftpd Daemon | ||
| 3 | |||
| 4 | [Service] | ||
| 5 | Type=forking | ||
| 6 | ExecStart=-@SBINDIR@/proftpd -c @SYSCONFDIR@/proftpd.conf | ||
| 7 | StandardError=syslog | ||
diff --git a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb index cba39e8e24..13c9410012 100644 --- a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb +++ b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5.bb | |||
| @@ -11,12 +11,13 @@ SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \ | |||
| 11 | file://close-RequireValidShell-check.patch \ | 11 | file://close-RequireValidShell-check.patch \ |
| 12 | file://contrib.patch \ | 12 | file://contrib.patch \ |
| 13 | file://build_fixup.patch \ | 13 | file://build_fixup.patch \ |
| 14 | file://proftpd.service \ | ||
| 14 | " | 15 | " |
| 15 | 16 | ||
| 16 | SRC_URI[md5sum] = "aff1bff40e675244d72c4667f203e5bb" | 17 | SRC_URI[md5sum] = "aff1bff40e675244d72c4667f203e5bb" |
| 17 | SRC_URI[sha256sum] = "c10316fb003bd25eccbc08c77dd9057e053693e6527ffa2ea2cc4e08ccb87715" | 18 | SRC_URI[sha256sum] = "c10316fb003bd25eccbc08c77dd9057e053693e6527ffa2ea2cc4e08ccb87715" |
| 18 | 19 | ||
| 19 | inherit autotools-brokensep useradd update-rc.d | 20 | inherit autotools-brokensep useradd update-rc.d systemd |
| 20 | 21 | ||
| 21 | PACKAGECONFIG ??= "sia shadow" | 22 | PACKAGECONFIG ??= "sia shadow" |
| 22 | PACKAGECONFIG += " ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}" | 23 | PACKAGECONFIG += " ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}" |
| @@ -87,11 +88,21 @@ do_install () { | |||
| 87 | # create the pub directory | 88 | # create the pub directory |
| 88 | mkdir -p ${D}/home/${FTPUSER}/pub/ | 89 | mkdir -p ${D}/home/${FTPUSER}/pub/ |
| 89 | chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub | 90 | chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub |
| 91 | |||
| 92 | install -d ${D}/${systemd_unitdir}/system | ||
| 93 | install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system | ||
| 94 | sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ | ||
| 95 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
| 96 | -e 's,@SBINDIR@,${sbindir},g' \ | ||
| 97 | -i ${D}${systemd_unitdir}/system/*.service | ||
| 90 | } | 98 | } |
| 91 | 99 | ||
| 92 | INITSCRIPT_NAME = "proftpd" | 100 | INITSCRIPT_NAME = "proftpd" |
| 93 | INITSCRIPT_PARAM = "defaults 85 15" | 101 | INITSCRIPT_PARAM = "defaults 85 15" |
| 94 | 102 | ||
| 103 | SYSTEMD_PACKAGES = "${PN}" | ||
| 104 | SYSTEMD_SERVICE_${PN} = "proftpd.service" | ||
| 105 | |||
| 95 | USERADD_PACKAGES = "${PN}" | 106 | USERADD_PACKAGES = "${PN}" |
| 96 | GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}" | 107 | GROUPADD_PARAM_${PN} = "--system ${FTPGROUP}" |
| 97 | USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \ | 108 | USERADD_PARAM_${PN} = "--system -g ${FTPGROUP} --home-dir /var/lib/${FTPUSER} --no-create-home \ |
