aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjadawin <jadawin@FreeBSD.org>2010-07-05 15:43:03 +0800
committerjadawin <jadawin@FreeBSD.org>2010-07-05 15:43:03 +0800
commit0b536ca83f6a0231316df53b7763268f0add11a1 (patch)
tree92872f88518e55c0e6a53c0b52fd112e030dbb14
parent80850fc7d266bc104f8b0ec8e623c15d0bb427cc (diff)
downloadfreebsd-ports-gnome-0b536ca83f6a0231316df53b7763268f0add11a1.tar.gz
freebsd-ports-gnome-0b536ca83f6a0231316df53b7763268f0add11a1.tar.zst
freebsd-ports-gnome-0b536ca83f6a0231316df53b7763268f0add11a1.zip
Shell In A Box is a web server that can export arbitary command line tools to a
web based terminal emulator WWW: http://code.google.com/p/shellinabox/ PR: ports/148211 Submitted by: Olivier Cochard-Labbe <olivier at cochard.me> Feature safe: yes
-rw-r--r--www/Makefile1
-rw-r--r--www/shellinabox/Makefile51
-rw-r--r--www/shellinabox/distinfo3
-rw-r--r--www/shellinabox/files/patch-ssl.in12
-rw-r--r--www/shellinabox/files/pkg-deinstall.in12
-rw-r--r--www/shellinabox/files/shellinaboxd.in56
-rw-r--r--www/shellinabox/pkg-descr4
-rw-r--r--www/shellinabox/pkg-plist5
8 files changed, 144 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index 387e957c0ab8..0a0f97b54286 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1580,6 +1580,7 @@
SUBDIR += serf
SUBDIR += servlet-api
SUBDIR += session2
+ SUBDIR += shellinabox
SUBDIR += shttpd
SUBDIR += sidplug
SUBDIR += simplog
diff --git a/www/shellinabox/Makefile b/www/shellinabox/Makefile
new file mode 100644
index 000000000000..e4ba89287dce
--- /dev/null
+++ b/www/shellinabox/Makefile
@@ -0,0 +1,51 @@
+# New ports collection makefile for: shellinabox
+# Date created: 25 june 2010
+# Whom: Olivier Cochard-Labbe <olivier@cochard.me>
+#
+# $FreeBSD$
+#
+
+PORTNAME= shellinabox
+PORTVERSION= 2.10
+CATEGORIES= www
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+
+MAINTAINER= olivier@cochard.me
+COMMENT= Publish command line shell through AJAX interface
+
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS= \
+ --prefix=${PREFIX} \
+ --infodir=${PREFIX}/${INFO_PATH} \
+ --mandir=${MANPREFIX}/man
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+USE_RC_SUBR= shellinaboxd
+USERS= shellinabox
+GROUPS= shellinabox
+
+MAN1= shellinaboxd.1
+
+PORTDOCS= AUTHORS ChangeLog INSTALL README COPYING GPL-2 NEWS TODO
+
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+
+SUB_FILES= pkg-deinstall
+
+post-install:
+ @${MKDIR} ${PREFIX}/etc/shellinabox
+ @${CHMOD} 700 ${PREFIX}/etc/shellinabox
+ @${CHOWN} ${USERS}:${GROUPS} ${PREFIX}/etc/shellinabox
+ ${INSTALL_MAN} ${WRKSRC}/shellinaboxd.1 ${PREFIX}/man/man1
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/shellinaboxd ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/www/shellinabox/distinfo b/www/shellinabox/distinfo
new file mode 100644
index 000000000000..cc6efbc4268c
--- /dev/null
+++ b/www/shellinabox/distinfo
@@ -0,0 +1,3 @@
+MD5 (shellinabox-2.10.tar.gz) = 0e144910d85d92edc54702ab9c46f032
+SHA256 (shellinabox-2.10.tar.gz) = 9a2dfa14fcb050de6f450b3b53522f2106cdef4a5591e3e41bd00de1e11d43cb
+SIZE (shellinabox-2.10.tar.gz) = 513430
diff --git a/www/shellinabox/files/patch-ssl.in b/www/shellinabox/files/patch-ssl.in
new file mode 100644
index 000000000000..d4ffa216cbc2
--- /dev/null
+++ b/www/shellinabox/files/patch-ssl.in
@@ -0,0 +1,12 @@
+--- libhttp/ssl.c.orig 2010-07-01 12:15:40.000000000 +0200
++++ libhttp/ssl.c 2010-07-01 12:16:56.000000000 +0200
+@@ -626,6 +626,9 @@
+ return -1;
+ }
+ struct hostent *he = gethostbyname(name);
++ if (!he) {
++ return -1;
++ }
+ *ret = *he;
+ if (result) {
+ *result = ret;
diff --git a/www/shellinabox/files/pkg-deinstall.in b/www/shellinabox/files/pkg-deinstall.in
new file mode 100644
index 000000000000..1cac37c70100
--- /dev/null
+++ b/www/shellinabox/files/pkg-deinstall.in
@@ -0,0 +1,12 @@
+#! /bin/sh
+# $FreeBSD$
+#
+
+PATH=/bin:/usr/bin:/usr/sbin
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+ exit 0
+fi
+if [ -d %%PREFIX%%/etc/shellinabox ]; then
+ echo "===> You may delete '%%PREFIX%%/etc/shellinabox' if you want to remove the SSL certificate left."
+fi
diff --git a/www/shellinabox/files/shellinaboxd.in b/www/shellinabox/files/shellinaboxd.in
new file mode 100644
index 000000000000..8208a2c9e3c1
--- /dev/null
+++ b/www/shellinabox/files/shellinaboxd.in
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# Shell in a Box Daemon startup script
+#
+# PROVIDE: shellinaboxd
+# REQUIRE: login
+# KEYWORD: shutdown
+
+#
+# Add the following to /etc/rc.conf[.local] to enable this service
+#
+# shellinaboxd_enable="YES"
+#
+# You can fine tune others variables too:
+# shellinaboxd_fib="NONE"
+# shellinaboxd_pidfile="/var/run/shellinabox.pid"
+# shellinaboxd_port="4200"
+# shellinaboxd_certdir="%%PREFIX%%/etc/shellinabox"
+# shellinaboxd_flags=""
+
+shellinaboxd_setfib() {
+ sysctl net.fibs >/dev/null 2>&1 || return 0
+
+ case "$shellinaboxd_fib" in
+ [Nn][Oo][Nn][Ee])
+ ;;
+ *)
+ command="setfib -F ${shellinaboxd_fib} ${command}"
+ ;;
+ esac
+}
+
+. /etc/rc.subr
+
+name="shellinaboxd"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/bin/${name}"
+start_precmd="shellinaboxd_setfib"
+
+load_rc_config $name
+
+shellinaboxd_enable=${shellinaboxd_enable:-"NO"}
+shellinaboxd_fib=${shellinaboxd_fib:-"NONE"}
+shellinaboxd_port=${shellinaboxd_port:-"4200"}
+shellinaboxd_certdir=${shellinaboxd_certdir:-"%%PREFIX%%/etc/shellinabox"}
+
+pidfile=${shellinaboxd_pidfile:-"/var/run/shellinaboxd.pid"}
+
+required_dirs="${shellinaboxd_certdir}"
+
+command_args="--group=shellinabox --user=shellinabox --port=${shellinaboxd_port} --cert=${shellinaboxd_certdir} --background=${pidfile}"
+
+run_rc_command "$1"
diff --git a/www/shellinabox/pkg-descr b/www/shellinabox/pkg-descr
new file mode 100644
index 000000000000..b82a17c854d3
--- /dev/null
+++ b/www/shellinabox/pkg-descr
@@ -0,0 +1,4 @@
+Shell In A Box is a web server that can export arbitary command line tools to a
+web based terminal emulator
+
+WWW: http://code.google.com/p/shellinabox/
diff --git a/www/shellinabox/pkg-plist b/www/shellinabox/pkg-plist
new file mode 100644
index 000000000000..15ac7cfb00ed
--- /dev/null
+++ b/www/shellinabox/pkg-plist
@@ -0,0 +1,5 @@
+bin/shellinaboxd
+@exec mkdir -p %D/etc/shellinabox
+@exec chmod 777 %D/etc/shellinabox
+@exec chown nobody %D/etc/shellinabox
+@dirrmtry etc/shellinabox