diff options
Diffstat (limited to 'abs/extra/shellinabox')
-rw-r--r-- | abs/extra/shellinabox/PKGBUILD | 53 | ||||
-rw-r--r-- | abs/extra/shellinabox/__changelog | 9 | ||||
-rw-r--r-- | abs/extra/shellinabox/shellinaboxd.conf.d | 5 | ||||
-rw-r--r-- | abs/extra/shellinabox/shellinaboxd.gen_light_conf.d | 1 | ||||
-rw-r--r-- | abs/extra/shellinabox/shellinaboxd.include | 7 | ||||
-rw-r--r-- | abs/extra/shellinabox/shellinaboxd.install | 24 | ||||
-rw-r--r-- | abs/extra/shellinabox/shellinaboxd.rc.d | 38 | ||||
-rw-r--r-- | abs/extra/shellinabox/shellinaboxd.service | 17 |
8 files changed, 154 insertions, 0 deletions
diff --git a/abs/extra/shellinabox/PKGBUILD b/abs/extra/shellinabox/PKGBUILD new file mode 100644 index 0000000..af3b4be --- /dev/null +++ b/abs/extra/shellinabox/PKGBUILD @@ -0,0 +1,53 @@ +# Contributor: Brian Moore <archlinux@cptl.org> +pkgname=shellinabox +pkgver=2.14 +pkgrel=6 +pkgdesc="A web-based ssh client." +arch=('i686' 'x86_64') +url="http://shellinabox.com/" +license=('GPL2') +depends=('runit-scripts>=8.0-2') +optdepends=('openssh: SSL support') +makedepends=(openssh) +install=shellinaboxd.install +backup=('etc/conf.d/shellinaboxd') +source=("http://shellinabox.googlecode.com/files/$pkgname-$pkgver.tar.gz" "shellinaboxd.rc.d" "shellinaboxd.conf.d" "shellinaboxd.service" + "shellinaboxd.include" "shellinaboxd.gen_light_conf.d") + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" configure +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + + #change default to show onscreen keyboard + sed -i "s/this.softKeyboard = false;/this.softKeyboard = true;/g" ./shellinabox/vt100.js + sed -i "s/this.softKeyboard = false;/this.softKeyboard = true;/g" ./shellinabox/vt100.jspp + + ./configure --prefix=/usr + + make +} +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR=$pkgdir install || return 1 + + install -Dm755 $srcdir/shellinaboxd.rc.d $pkgdir/etc/rc.d/shellinaboxd + install -D -m644 $srcdir/shellinaboxd.service $pkgdir/usr/lib/systemd/system/shellinaboxd.service + install -Dm644 $srcdir/shellinaboxd.conf.d $pkgdir/etc/conf.d/shellinaboxd + install -dm700 -o nobody $pkgdir/var/lib/shellinabox + + #install conf files for lighttpd + mkdir -p ${pkgdir}/etc/lighttpd + install -D -m 644 ${srcdir}/shellinaboxd.include ${pkgdir}/etc/lighttpd/ + #gen_light_conf + install -D -m 744 ${srcdir}/shellinaboxd.gen_light_conf.d ${pkgdir}/etc/gen_light_conf.d/shellinaboxd.conf +} +md5sums=('6c63b52edcebc56ee73a108e7211d174' + 'feea22575089cc7eb4925b1daff88b8c' + '77e487f36da2abe51251500f4a1e024f' + 'be649866d06ba497d88bb14f3e58f862' + 'dd46ab61bfafdb56ea705a876963550e' + 'aadd1edf4110aca2d16d806791e90019') diff --git a/abs/extra/shellinabox/__changelog b/abs/extra/shellinabox/__changelog new file mode 100644 index 0000000..d0d35bb --- /dev/null +++ b/abs/extra/shellinabox/__changelog @@ -0,0 +1,9 @@ +#8/13/2013 +initial inclusion from AUR v2.14-3 +add dep of runit-scripts to PKGBUILD +add shellinaboxd.install + +# 8/14/2013 +add proxy config to PKGBUILD & .install +add shellinaboxd.include and shellinaboxd.gen_light_conf.d +change default onscreen keyboard to true diff --git a/abs/extra/shellinabox/shellinaboxd.conf.d b/abs/extra/shellinabox/shellinaboxd.conf.d new file mode 100644 index 0000000..646bab7 --- /dev/null +++ b/abs/extra/shellinabox/shellinaboxd.conf.d @@ -0,0 +1,5 @@ +# +# Parameters to be passed to shellinaboxd +# +SHELLINABOXD_ARGS="-t -b" + diff --git a/abs/extra/shellinabox/shellinaboxd.gen_light_conf.d b/abs/extra/shellinabox/shellinaboxd.gen_light_conf.d new file mode 100644 index 0000000..5512216 --- /dev/null +++ b/abs/extra/shellinabox/shellinaboxd.gen_light_conf.d @@ -0,0 +1 @@ +include "/etc/lighttpd/shellinaboxd.include" diff --git a/abs/extra/shellinabox/shellinaboxd.include b/abs/extra/shellinabox/shellinaboxd.include new file mode 100644 index 0000000..8d2befa --- /dev/null +++ b/abs/extra/shellinabox/shellinaboxd.include @@ -0,0 +1,7 @@ +#proxy for shellinaboxd +$HTTP["url"] =~ "/shell/" { + proxy.server = ( "" => ( + ("host" => "127.0.0.1", "port" => 4200) + )) +} + diff --git a/abs/extra/shellinabox/shellinaboxd.install b/abs/extra/shellinabox/shellinaboxd.install new file mode 100644 index 0000000..1fb3a79 --- /dev/null +++ b/abs/extra/shellinabox/shellinaboxd.install @@ -0,0 +1,24 @@ +post_install() { + echo "Generate lighttpd include..." + gen_light_include.py + echo "Create link to linhes.pem..." + ln -s /etc/lighttpd/linhes.pem /etc/lighttpd/certificate.pem + echo "Start runit service for shellinaboxd..." + add_service.sh shellinaboxd + /sbin/sv restart shellinaboxd +} + +post_upgrade() { + post_install +} + +post_remove() { + echo "Generate lighttpd include..." + gen_light_include.py + echo "Forcing a re-read of lighttpd's configuration file..." + /sbin/sv hup /service/lighttpd + echo "Remove link to linhes.pem..." + rm /etc/lighttpd/certificate.pem + echo "Remove runit service for shellinaboxd..." + remove_service.sh shellinaboxd +} diff --git a/abs/extra/shellinabox/shellinaboxd.rc.d b/abs/extra/shellinabox/shellinaboxd.rc.d new file mode 100644 index 0000000..3399945 --- /dev/null +++ b/abs/extra/shellinabox/shellinaboxd.rc.d @@ -0,0 +1,38 @@ +#!/bin/bash +. /etc/rc.conf +. /etc/rc.d/functions + +SHELLINABOXD_ARGS= +[ -f /etc/conf.d/shellinaboxd ] && . /etc/conf.d/shellinaboxd + +PID=`pidof -o %PPID /usr/bin/shellinaboxd` +case "$1" in + start) + stat_busy "Starting SHELLINABOXD" + [ -z "$PID" ] && /usr/bin/shellinaboxd ${SHELLINABOXD_ARGS} + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon shellinaboxd + stat_done + fi + ;; + stop) + stat_busy "Stopping SHELLINABOXD" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon shellinboxd + stat_done + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 + diff --git a/abs/extra/shellinabox/shellinaboxd.service b/abs/extra/shellinabox/shellinaboxd.service new file mode 100644 index 0000000..d92065b --- /dev/null +++ b/abs/extra/shellinabox/shellinaboxd.service @@ -0,0 +1,17 @@ +[Unit] +Description=Serve a login-terminal over http on port 4200. +Required=sshd.service +After=sshd.service + +[Service] +User=root +Type=forking +EnvironmentFile=/etc/conf.d/shellinaboxd +ExecStart=/usr/bin/shellinaboxd $SHELLINABOXD_ARGS +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=on-abort + +[Install] +WantedBy=multi-user.target + |