mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
network/hamachi: Added (LogMeIn VPN client)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
parent
2fbb29de1a
commit
0054905145
6 changed files with 177 additions and 0 deletions
45
network/hamachi/README
Normal file
45
network/hamachi/README
Normal file
|
@ -0,0 +1,45 @@
|
|||
LogMeIn Hamachi2 is a hosted VPN service that securely connects devices and
|
||||
networks, extending LAN-like network connectivity to mobile users,
|
||||
distributed teams and business applications. You can easily create secure
|
||||
virtual networks on demand, across public and private networks.
|
||||
|
||||
Linux beta binary blob from https://secure.logmein.com/US/labs/
|
||||
|
||||
This requires the "tun" driver to be built into the kernel or available as
|
||||
a module- not a problem for Slackware (indeed, most) kernels.
|
||||
|
||||
Provided is a sample rc.d script, /etc/rc.d/rc.d/rc.hamachi, to start the
|
||||
Hamachi2 daemon. To run it on boot, make it executable with
|
||||
|
||||
chmod +x /etc/rc.d/rc.hamachi
|
||||
|
||||
and add the following to /etc/rc.d/rc.local:
|
||||
|
||||
if [ -x /etc/rc.d/rc.hamachi ]; then
|
||||
. /etc/rc.d/rc.hamachi start
|
||||
fi
|
||||
|
||||
Hamachi2 writes its configuration information to /var/lib/logmein-hamachi.
|
||||
To modify the server configuration, add your parameters to
|
||||
/var/lib/logmein-hamachi/h2-engine-override.cfg and restart the daemon with
|
||||
/etc/rc.d/rc.hamachi restart. Parameters you can change (in fact, the
|
||||
daemon's current configuration) are listed in h2-engine.cfg in this
|
||||
directory.
|
||||
|
||||
Example /var/lib/logmein-hamachi/h2-engine-override.cfg:
|
||||
|
||||
Conn.DisableUpnp 1
|
||||
Ipc.User vike
|
||||
Sock.TcpAddr 192.168.1.33
|
||||
Sock.TcpPort 51232
|
||||
Sock.UdpAddr 192.168.1.33
|
||||
Sock.UdpPort 51232
|
||||
|
||||
This config allows the user vike to use the hamachi command for controlling
|
||||
the vpn. It also disables UPnP for negotiation of the hamachi listen socket
|
||||
and forces it to the address and port listed. This is useful when you are
|
||||
willing to do a port forward yourself, because UPnP can be unreliable.
|
||||
|
||||
For more information run the hamachi command without parameters and see
|
||||
/usr/doc/hamachi-<version>/README.
|
||||
|
2
network/hamachi/doinst.sh
Normal file
2
network/hamachi/doinst.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
/usr/bin/ln -sf /usr/share/hamachi/hamachid /usr/bin/hamachi
|
||||
|
65
network/hamachi/hamachi.SlackBuild
Normal file
65
network/hamachi/hamachi.SlackBuild
Normal file
|
@ -0,0 +1,65 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Slackware build script for hamachi
|
||||
|
||||
# Written by Adam Swift vikepack@omnitude.net
|
||||
|
||||
PRGNAM=hamachi
|
||||
SRCPKGNAM=logmein-$PRGNAM
|
||||
VERSION=${VERSION:-2.0.1.13}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i486 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
LIBDIRSUFFIX="64"
|
||||
SRCPKGSUFFIX="x64"
|
||||
else
|
||||
LIBDIRSUFFIX=""
|
||||
SRCPKGSUFFIX="x86"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $SRCPKGNAM-$VERSION-$SRCPKGSUFFIX
|
||||
tar xvf $CWD/$SRCPKGNAM-$VERSION-$SRCPKGSUFFIX.tgz
|
||||
cd $SRCPKGNAM-$VERSION-$SRCPKGSUFFIX
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
mkdir -p $PKG/usr/share/$PRGNAM
|
||||
cp -a hamachid dnsup dnsdown $PKG/usr/share/$PRGNAM
|
||||
|
||||
mkdir -p $PKG/etc/rc.d
|
||||
cat $CWD/rc.hamachi > $PKG/etc/rc.d/rc.hamachi
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a README CHANGES LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
||||
|
10
network/hamachi/hamachi.info
Normal file
10
network/hamachi/hamachi.info
Normal file
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="hamachi"
|
||||
VERSION="2.0.1.13"
|
||||
HOMEPAGE="https://secure.logmein.com/US/labs/"
|
||||
DOWNLOAD="https://secure.logmein.com/labs/logmein-hamachi-2.0.1.13-x86.tgz"
|
||||
MD5SUM="96c8354d0881b531927fb7603fb7895b"
|
||||
DOWNLOAD_x86_64="https://secure.logmein.com/labs/logmein-hamachi-2.0.1.13-x64.tgz"
|
||||
MD5SUM_x86_64="a285d9baec2ee60f2c8f151fd1e46ff2"
|
||||
MAINTAINER="Adam Swift"
|
||||
EMAIL="vikepack@omnitude.net"
|
||||
APPROVED="Niels Horn"
|
36
network/hamachi/rc.hamachi
Normal file
36
network/hamachi/rc.hamachi
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
# Start/stop/restart the hamachi "zero-conf" VPN service
|
||||
HAMACHI_DIR=/usr/share/hamachi
|
||||
|
||||
hamachi_start() {
|
||||
# ensure the tun driver is loaded- hamachi fails to start if it is not
|
||||
/sbin/modprobe tun
|
||||
$HAMACHI_DIR/hamachid
|
||||
}
|
||||
|
||||
hamachi_stop() {
|
||||
if [ -e "/var/run/logmein-hamachi/hamachid.pid" ]; then
|
||||
kill `cat /var/run/logmein-hamachi/hamachid.pid`
|
||||
fi
|
||||
}
|
||||
|
||||
hamachi_restart() {
|
||||
hamachi_stop
|
||||
sleep 1
|
||||
hamachi_start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
'start')
|
||||
hamachi_start
|
||||
;;
|
||||
'stop')
|
||||
hamachi_stop
|
||||
;;
|
||||
'restart')
|
||||
hamachi_restart
|
||||
;;
|
||||
*)
|
||||
echo "usage $0 start|stop|restart"
|
||||
esac
|
||||
|
19
network/hamachi/slack-desc
Normal file
19
network/hamachi/slack-desc
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
hamachi: Hamachi2 (LogMeIn VPN client)
|
||||
hamachi:
|
||||
hamachi: LogMeIn Hamachi2 is a hosted VPN service that securely connects
|
||||
hamachi: devices and networks, extending LAN-like network connectivity to
|
||||
hamachi: mobile users, distributed teams and business applications. You can
|
||||
hamachi: easily create secure virtual networks on demand, across public and
|
||||
hamachi: private networks.
|
||||
hamachi:
|
||||
hamachi: Linux beta binary blob from https://secure.logmein.com/US/labs/
|
||||
hamachi:
|
||||
hamachi:
|
Loading…
Reference in a new issue