Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Submitted on March 15, 2017 at 07:27 AM

#!/bin/sh

for i in `seq 1 1000`
do
    echo "running for $i time"
    # Clone jail zfs dataset and create the jail where 11jail is a stock FreeBSD 11/12 RELEASE/STABLE/CURRENT/ jail respectively.
    zfs clone zroot/jails/11jail@base zroot/jails/jail1
    jail -c path=/jails/jail1 host.hostname=jail1 persist=true name=jail1 vnet

    # Create and rename epair interfaces and add to jail
    ifconfig epair create
    ifconfig epair0a up
    ifconfig epair0b vnet jail1
    jexec jail1 ifconfig epair0b inet 192.168.1.1 netmask 255.255.255.0 up

    # Remove interface from jail and destroy epair, jail and zfs dataset.
    ifconfig epair0b -vnet jail1
    ifconfig epair0a destroy
    jail -r jail1
    zfs destroy -rf zroot/jails/jail1
    echo "-----------------------"
done
#!/bin/sh

for i in `seq 1 100`
do
    echo "running for $i time"
    # Clone jail zfs dataset and create the jail where 11jail is a stock FreeBSD 11/12 RELEASE/STABLE/CURRENT/ jail respectively
    zfs clone zroot/jails/11jail@base zroot/jails/jail1
    jail -c path=/jails/jail1 host.hostname=jail1 persist=true name=jail1 vnet

    # Create and rename epair interfaces and add to jail
    ifconfig epair create
    ifconfig epair0a name jail1_a
    ifconfig epair0b name jail1_b
    ifconfig jail1_a up
    ifconfig jail1_b vnet jail1
    jexec jail1 ifconfig jail1_b inet 192.168.1.1 netmask 255.255.255.0 up

    # Remove interface from jail and destroy epair, jail and zfs dataset.
    ifconfig jail1_b -vnet jail1
    ifconfig jail1_a destroy
    jail -r jail1
    zfs destroy -rf zroot/jails/jail1
    echo "-----------------------"
done