From 9cdc5bc1180f8ba205326668aa153bac93f1c58d Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Thu, 22 Feb 2018 18:52:05 +0800 Subject: [PATCH] remove deb package --- sshpiperd/deb/build.sh | 84 ---------------------------------- sshpiperd/deb/init.d/sshpiperd | 47 ------------------- sshpiperd/deb/sshpiperd.conf | 23 ---------- 3 files changed, 154 deletions(-) delete mode 100755 sshpiperd/deb/build.sh delete mode 100644 sshpiperd/deb/init.d/sshpiperd delete mode 100644 sshpiperd/deb/sshpiperd.conf diff --git a/sshpiperd/deb/build.sh b/sshpiperd/deb/build.sh deleted file mode 100755 index 278c1b07..00000000 --- a/sshpiperd/deb/build.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash -set -e - -BASEDIR=$(dirname $(readlink -f $0)) - -DIST_BIN=${1:-$GOPATH/bin/sshpiperd} -DIST_BIN=`readlink -f $DIST_BIN` - -if [ ! -x $DIST_BIN ];then - echo "can not find sshpiper bin" - exit -fi - -echo "packing bin:$DIST_BIN" - -VERSION=`$DIST_BIN --version | grep -Po "ver: .*? " | sed "s/ver: *//g" | sed "s/ *$//g"` -VERSION=${VERSION#v} ## remove v - -echo "building .deb for ver: $VERSION" - -DIST_DIR=`mktemp -d` - - -## copy from docker -cat > $DIST_DIR/postinst <<'EOF' -#!/bin/sh -set -e -set -u - -update-rc.d sshpiperd defaults > /dev/null || true -if [ -n "$2" ]; then - _dh_action=restart -else - _dh_action=start -fi -service sshpiperd $_dh_action 2>/dev/null || true -#DEBHELPER# -EOF - -cat > $DIST_DIR/prerm <<'EOF' -#!/bin/sh -set -e -set -u -service sshpiperd stop 2>/dev/null || true -#DEBHELPER# -EOF - -chmod +x $DIST_DIR/postinst $DIST_DIR/prerm - - -mkdir -p $DIST_DIR/root/var/sshpiper -mkdir -p $DIST_DIR/root/etc/ -mkdir -p $DIST_DIR/root/usr/local/bin - -cp $DIST_BIN $DIST_DIR/root/usr/local/bin -cp $BASEDIR/sshpiperd.conf $DIST_DIR/root/etc - - -NAME=sshpiperd -MAINTAINER=tgic -CATEGORY=net -DESCRIPTION="Username based SSH Reverse Proxy" -LICENSE="The MIT License (MIT)" -HOMEPAGE="https://github.com/tg123/sshpiper" - -echo $BASEDIR - -fpm -f -s dir -t deb -n "$NAME" -v "$VERSION" \ - --deb-init $BASEDIR/init.d/sshpiperd \ - --deb-priority optional \ - --after-install $DIST_DIR/postinst \ - --before-remove $DIST_DIR/prerm \ - --prefix / \ - --maintainer "$MAINTAINER" \ - --description "$DESCRIPTION" \ - --category "$CATEGORY" \ - --depends libpam0g \ - --provides sshpiperd \ - --url "$HOMEPAGE" \ - --license "$LICENSE" \ - --config-files /etc/sshpiperd.conf \ - -C $DIST_DIR/root . - -rm -rf $DIST_DIR diff --git a/sshpiperd/deb/init.d/sshpiperd b/sshpiperd/deb/init.d/sshpiperd deleted file mode 100644 index 5abb9eda..00000000 --- a/sshpiperd/deb/init.d/sshpiperd +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/sh - -### BEGIN INIT INFO -# Provides: sshpiperd -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Username based SSH Reverse Proxy -### END INIT INFO - -. /lib/lsb/init-functions - -SSHPIPERD_BIN=/usr/local/bin/sshpiperd -SSHPIPERD_PID=/var/run/sshpiperd.pid - -touch $SSHPIPERD_PID - -case "$1" in - start) - log_begin_msg "Starting SSHPiperd" - start-stop-daemon --start --background \ - --exec "$SSHPIPERD_BIN" \ - --pidfile "$SSHPIPERD_PID" --make-pidfile - log_end_msg $? - ;; - - stop) - log_begin_msg "Stopping SSHPiperd" - start-stop-daemon --stop --pidfile "$SSHPIPERD_PID" - log_end_msg $? - ;; - - restart) - $0 stop - $0 start - ;; - - status) - status_of_proc -p "$SSHPIPERD_PID" "$SSHPIPERD_BIN" "SSHPiperd" - ;; - - *) - echo "Usage: $0 {start|stop|restart|status}" - exit 1 - ;; -esac diff --git a/sshpiperd/deb/sshpiperd.conf b/sshpiperd/deb/sshpiperd.conf deleted file mode 100644 index 2a3e2525..00000000 --- a/sshpiperd/deb/sshpiperd.conf +++ /dev/null @@ -1,23 +0,0 @@ -## SSH Piper -## Username based SSH Reverse Proxy -## see https://github.com/tg123/sshpiper#configuration - -## log path -LOG=/var/log/sshpiperd.log - -## Additional challenger name -## https://github.com/tg123/sshpiper#additional-challenge -#CHALLENGER=pam - -# Server Key file for SSH Piper -#SERVER_KEY=/etc/ssh/ssh_host_rsa_key - -## Listening Address -#LISTEN_ADDR=0.0.0.0 - -## Listening Port -#PORT=2222 - -## Working Dir -## https://github.com/tg123/sshpiper#files-inside-working-dir -#WORKING_DIR=/var/sshpiper