summaryrefslogtreecommitdiff
path: root/ftp
diff options
context:
space:
mode:
authorMichael Haro <mharo@FreeBSD.org>1999-10-10 07:10:41 +0000
committerMichael Haro <mharo@FreeBSD.org>1999-10-10 07:10:41 +0000
commit9b9c3928fd37d9295103c597860b9f51a4ff9946 (patch)
tree992c4b472878c86e27efa5f92ce77b01d1d516e1 /ftp
parentupdate to 1.2.0pre8 (diff)
- add a startup script for use with standalone mode
- don't install config files as scripts - strip binary on install
Notes
Notes: svn path=/head/; revision=22295
Diffstat (limited to 'ftp')
-rw-r--r--ftp/proftpd-devel/Makefile8
-rw-r--r--ftp/proftpd-devel/files/proftpd.sh.sample18
-rw-r--r--ftp/proftpd-devel/pkg-plist3
-rw-r--r--ftp/proftpd/Makefile8
-rw-r--r--ftp/proftpd/files/proftpd.sh.sample18
-rw-r--r--ftp/proftpd/pkg-plist3
6 files changed, 52 insertions, 6 deletions
diff --git a/ftp/proftpd-devel/Makefile b/ftp/proftpd-devel/Makefile
index f3e51214be87..62eff5650a73 100644
--- a/ftp/proftpd-devel/Makefile
+++ b/ftp/proftpd-devel/Makefile
@@ -39,20 +39,22 @@ post-configure:
@${SED} -e 's:/usr/bin:${PREFIX}/bin:' \
< ${WRKSRC}/src/ftpcount.1.pre_sed > ${WRKSRC}/src/ftpcount.1
-STRIP=
+#STRIP=
do-install:
+ @${MKDIR} /var/run/proftpd
@${INSTALL_PROGRAM} ${WRKSRC}/ftpcount ${PREFIX}/bin/ftpcount
@${INSTALL_PROGRAM} ${WRKSRC}/proftpd ${PREFIX}/libexec/proftpd
@${INSTALL_PROGRAM} ${WRKSRC}/ftpshut ${PREFIX}/sbin/ftpshut
@${INSTALL_MAN} ${WRKSRC}/src/ftpcount.1 ${PREFIX}/man/man1/ftpcount.1
@${INSTALL_MAN} ${WRKSRC}/src/ftpshut.8 ${PREFIX}/man/man8/ftpshut.8
@${INSTALL_MAN} ${WRKSRC}/src/proftpd.8 ${PREFIX}/man/man8/proftpd.8
- @${INSTALL_SCRIPT} \
+ @${INSTALL_DATA} \
${WRKSRC}/sample-configurations/basic.conf ${PREFIX}/etc/proftpd.conf.default
@if [ ! -f ${PREFIX}/etc/proftpd.conf ]; then \
- ${INSTALL_SCRIPT} \
+ ${INSTALL_DATA} \
${WRKSRC}/sample-configurations/basic.conf ${PREFIX}/etc/proftpd.conf; \
fi
+ @${SED} -e 's,/usr/local,${PREFIX},g' ${FILESDIR}/proftpd.sh.sample > ${PREFIX}/etc/rc.d/proftpd.sh.sample
@${CAT} ${PKGMESSAGE}
diff --git a/ftp/proftpd-devel/files/proftpd.sh.sample b/ftp/proftpd-devel/files/proftpd.sh.sample
new file mode 100644
index 000000000000..d2598672f5e2
--- /dev/null
+++ b/ftp/proftpd-devel/files/proftpd.sh.sample
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+case "$1" in
+
+start)
+ if [ -x /usr/local/libexec/proftpd ]; then
+ /usr/local/libexec/proftpd && echo -n ' proftpd'
+ fi
+ ;;
+
+stop)
+ killall proftpd
+ ;;
+*)
+ echo "$0 start | stop"
+ ;;
+
+esac
diff --git a/ftp/proftpd-devel/pkg-plist b/ftp/proftpd-devel/pkg-plist
index e5b7471828b1..a0c97c6b7ffa 100644
--- a/ftp/proftpd-devel/pkg-plist
+++ b/ftp/proftpd-devel/pkg-plist
@@ -1,5 +1,8 @@
bin/ftpcount
etc/proftpd.conf.default
+etc/rc.d/proftpd.sh.sample
@exec if [ ! -f %D/etc/proftpd.conf ] ; then cp -p %D/%F %B/proftpd.conf; fi
libexec/proftpd
sbin/ftpshut
+@exec /bin/mkdir /var/run/proftpd
+@unexec /bin/rmdir /var/run/proftpd
diff --git a/ftp/proftpd/Makefile b/ftp/proftpd/Makefile
index f3e51214be87..62eff5650a73 100644
--- a/ftp/proftpd/Makefile
+++ b/ftp/proftpd/Makefile
@@ -39,20 +39,22 @@ post-configure:
@${SED} -e 's:/usr/bin:${PREFIX}/bin:' \
< ${WRKSRC}/src/ftpcount.1.pre_sed > ${WRKSRC}/src/ftpcount.1
-STRIP=
+#STRIP=
do-install:
+ @${MKDIR} /var/run/proftpd
@${INSTALL_PROGRAM} ${WRKSRC}/ftpcount ${PREFIX}/bin/ftpcount
@${INSTALL_PROGRAM} ${WRKSRC}/proftpd ${PREFIX}/libexec/proftpd
@${INSTALL_PROGRAM} ${WRKSRC}/ftpshut ${PREFIX}/sbin/ftpshut
@${INSTALL_MAN} ${WRKSRC}/src/ftpcount.1 ${PREFIX}/man/man1/ftpcount.1
@${INSTALL_MAN} ${WRKSRC}/src/ftpshut.8 ${PREFIX}/man/man8/ftpshut.8
@${INSTALL_MAN} ${WRKSRC}/src/proftpd.8 ${PREFIX}/man/man8/proftpd.8
- @${INSTALL_SCRIPT} \
+ @${INSTALL_DATA} \
${WRKSRC}/sample-configurations/basic.conf ${PREFIX}/etc/proftpd.conf.default
@if [ ! -f ${PREFIX}/etc/proftpd.conf ]; then \
- ${INSTALL_SCRIPT} \
+ ${INSTALL_DATA} \
${WRKSRC}/sample-configurations/basic.conf ${PREFIX}/etc/proftpd.conf; \
fi
+ @${SED} -e 's,/usr/local,${PREFIX},g' ${FILESDIR}/proftpd.sh.sample > ${PREFIX}/etc/rc.d/proftpd.sh.sample
@${CAT} ${PKGMESSAGE}
diff --git a/ftp/proftpd/files/proftpd.sh.sample b/ftp/proftpd/files/proftpd.sh.sample
new file mode 100644
index 000000000000..d2598672f5e2
--- /dev/null
+++ b/ftp/proftpd/files/proftpd.sh.sample
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+case "$1" in
+
+start)
+ if [ -x /usr/local/libexec/proftpd ]; then
+ /usr/local/libexec/proftpd && echo -n ' proftpd'
+ fi
+ ;;
+
+stop)
+ killall proftpd
+ ;;
+*)
+ echo "$0 start | stop"
+ ;;
+
+esac
diff --git a/ftp/proftpd/pkg-plist b/ftp/proftpd/pkg-plist
index e5b7471828b1..a0c97c6b7ffa 100644
--- a/ftp/proftpd/pkg-plist
+++ b/ftp/proftpd/pkg-plist
@@ -1,5 +1,8 @@
bin/ftpcount
etc/proftpd.conf.default
+etc/rc.d/proftpd.sh.sample
@exec if [ ! -f %D/etc/proftpd.conf ] ; then cp -p %D/%F %B/proftpd.conf; fi
libexec/proftpd
sbin/ftpshut
+@exec /bin/mkdir /var/run/proftpd
+@unexec /bin/rmdir /var/run/proftpd