This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NetVM=$1 | |
TargetVM=$2 | |
Service=$3 | |
TCP_Port=$4 | |
wasrunning=$(qvm-ls | grep $TargetVM | grep -i RUNNING) | |
echo -ne "TCP socket connection for $Service from $NetVM to $TargetVM on port $TCP_Port...\nPress Any Key to End\n\n" | |
trap cleanup 1 2 3 6 15 | |
cleanup() { | |
# qvm-run -p -u root $NetVM "iptables-save | grep -v 'SOCAT_PortFwd-$Service' | iptables-restore" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Inspired by https://gist.github.com/daktak/f887352d564b54f9e529404cc0eb60d5 | |
# Inspired by https://gist.github.com/jpouellet/d8cd0eb8589a5b9bf0c53a28fc530369 | |
ip() { qvm-prefs -g -- "$1" ip; } | |
netvm() { qvm-prefs -g -- "$1" netvm; } | |
forward() { | |
local from_domain=$1 | |
local to_domain=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Pod::Usage; | |
use IPC::Open3; | |
use Getopt::Long; | |
use File::Basename; | |
use constant { True => 1, False => 0 }; | |
use Symbol 'gensym'; | |
$|=1; #unbuffered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# script to check for complete torrents in transmission folder, then stop and move them | |
# either hard-code the MOVEDIR variable here… | |
MOVEDIR=/home/mjdescy/media # the folder to move completed downloads to | |
# …or set MOVEDIR using the first command-line argument | |
# MOVEDIR=%1 | |
# use transmission-remote to get torrent list from transmission-remote list | |
# use sed to delete first / last line of output, and remove leading spaces | |
# use cut to get first field from each line |