push changes
This commit is contained in:
parent
da1080d4c8
commit
6be5987f8d
@ -199,6 +199,9 @@ sub render_install_conf {
|
|||||||
chomp($jot_pass);
|
chomp($jot_pass);
|
||||||
my $_ipv4 = $vms{$vm_name}{'ipv4'} || "autoconf";
|
my $_ipv4 = $vms{$vm_name}{'ipv4'} || "autoconf";
|
||||||
$_ipv4 = "autoconf" if $conf{'conf'}{'DHCPD'} eq "yes";
|
$_ipv4 = "autoconf" if $conf{'conf'}{'DHCPD'} eq "yes";
|
||||||
|
|
||||||
|
#my $_dhcp_ipv4 = $conf{'conf'}{'IP_PREFIX'} . "." . ($conf{'conf'}{'IP_START'} + $vms{$vm_name}{'vm_number'}) if ;
|
||||||
|
|
||||||
my $_ipv4_gateway = $vms{$vm_name}{'ipv4_gw'} || $conf{'conf'}{'ROUTER'};
|
my $_ipv4_gateway = $vms{$vm_name}{'ipv4_gw'} || $conf{'conf'}{'ROUTER'};
|
||||||
my $_ipv6 = $vms{$vm_name}{'ipv6'} || $conf{'conf'}{'IPV6_PREFIX'} . ":" . ($conf{'conf'}{'IPV6_START'} + $vms{$vm_name}{'vm_number'}) . "::" . ($conf{'conf'}{'IP_START'} + $vms{$vm_name}{'vm_number'});
|
my $_ipv6 = $vms{$vm_name}{'ipv6'} || $conf{'conf'}{'IPV6_PREFIX'} . ":" . ($conf{'conf'}{'IPV6_START'} + $vms{$vm_name}{'vm_number'}) . "::" . ($conf{'conf'}{'IP_START'} + $vms{$vm_name}{'vm_number'});
|
||||||
my $_ipv6_gateway = $vms{$vm_name}{'ipv6_gw'} || $conf{'conf'}{'IPV6_PREFIX'} . ":" . ($conf{'conf'}{'IPV6_START'} + $vms{$vm_name}{'vm_number'}) . "::1";
|
my $_ipv6_gateway = $vms{$vm_name}{'ipv6_gw'} || $conf{'conf'}{'IPV6_PREFIX'} . ":" . ($conf{'conf'}{'IPV6_START'} + $vms{$vm_name}{'vm_number'}) . "::1";
|
||||||
|
24
notify.pl
24
notify.pl
@ -19,6 +19,7 @@
|
|||||||
# 2021/05/09 complete restructure and KISS
|
# 2021/05/09 complete restructure and KISS
|
||||||
# 2022/11/13 added price structure for notifications
|
# 2022/11/13 added price structure for notifications
|
||||||
# 2023/05/05 variable clean up, rework IP logic
|
# 2023/05/05 variable clean up, rework IP logic
|
||||||
|
# 2023/12/03 price increase, +3
|
||||||
#
|
#
|
||||||
use 5.024;
|
use 5.024;
|
||||||
use strict;
|
use strict;
|
||||||
@ -34,7 +35,7 @@ my $function_variable = $ARGV[1] || "empty";
|
|||||||
my $message = $ARGV[2] || "empty";
|
my $message = $ARGV[2] || "empty";
|
||||||
|
|
||||||
# define the prices for the different components of the VM
|
# define the prices for the different components of the VM
|
||||||
my $base_price = '64';
|
my $base_price = '67';
|
||||||
my %memory_prices = ('2G' => '10', '4G' => '30', '8G' => '70');
|
my %memory_prices = ('2G' => '10', '4G' => '30', '8G' => '70');
|
||||||
my %hdd_prices = ('50G' => '50', '100G' => '100', '150G' => '150', '200G' => '200');
|
my %hdd_prices = ('50G' => '50', '100G' => '100', '150G' => '150', '200G' => '200');
|
||||||
my $ideal_url;
|
my $ideal_url;
|
||||||
@ -42,18 +43,15 @@ my $paypal_url;
|
|||||||
my %stripe_urls = (
|
my %stripe_urls = (
|
||||||
'sponsor' => 'SPONSORED',
|
'sponsor' => 'SPONSORED',
|
||||||
'sponsored' => 'SPONSORED',
|
'sponsored' => 'SPONSORED',
|
||||||
'44' => 'https://buy.stripe.com/28odR0aWK0jq0aAeV0',
|
'47' => 'https://buy.stripe.com/28odR0aWK0jq0aAeV0',
|
||||||
'64' => 'https://buy.stripe.com/8wMaEO0i67LS1eE288',
|
'67' => 'https://buy.stripe.com/8wMaEO0i67LS1eE288',
|
||||||
'74' => 'https://buy.stripe.com/aEU5kuc0Ofek4qQ001',
|
'77' => 'https://buy.stripe.com/aEU5kuc0Ofek4qQ001',
|
||||||
'84' => 'https://buy.stripe.com/9AQ8wG8OCfek9LaaEI',
|
'97' => 'https://buy.stripe.com/3cs28i6GuaY4f5ueUZ',
|
||||||
'94' => 'https://buy.stripe.com/3cs28i6GuaY4f5ueUZ',
|
'117' => 'https://buy.stripe.com/14k00ae8W2ryg9y28a',
|
||||||
'114' => 'https://buy.stripe.com/14k00ae8W2ryg9y28a',
|
'127' => 'https://buy.stripe.com/cN2fZ81mac28g9ydQT',
|
||||||
'124' => 'https://buy.stripe.com/cN2fZ81mac28g9ydQT',
|
'147' => 'https://buy.stripe.com/cN214ec0O1nuf5u6ow',
|
||||||
'134' => 'https://buy.stripe.com/28o4gq0i67LSe1q8wD',
|
'277' => 'https://buy.stripe.com/28o5kuaWK6HO3mMeV8',
|
||||||
'144' => 'https://buy.stripe.com/cN214ec0O1nuf5u6ow',
|
'337' => 'https://buy.stripe.com/9AQfZ80i6gio8H64gq',
|
||||||
'184' => 'https://buy.stripe.com/9AQ8wGe8W0jq1eEdQZ',
|
|
||||||
'194' => 'https://buy.stripe.com/bIY5kugh4gioe1qeV6',
|
|
||||||
'334' => 'https://buy.stripe.com/9AQfZ80i6gio8H64gq',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
# fuction to parse _deploy.conf and vm*.txt files
|
# fuction to parse _deploy.conf and vm*.txt files
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019-2021 Mischa Peters <mischa @ openbsd.amsterdam>
|
# Copyright (c) 2019-2023 Mischa Peters <mischa @ openbsd.amsterdam>
|
||||||
#
|
#
|
||||||
# Permission to use, copy, modify, and distribute this software for any
|
# Permission to use, copy, modify, and distribute this software for any
|
||||||
# purpose with or without fee is hereby granted, provided that the above
|
# purpose with or without fee is hereby granted, provided that the above
|
||||||
@ -14,6 +14,7 @@
|
|||||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#
|
#
|
||||||
|
DELAY=0
|
||||||
SLEEP=240
|
SLEEP=240
|
||||||
CPU=$(($(sysctl -n hw.ncpuonline)-2))
|
CPU=$(($(sysctl -n hw.ncpuonline)-2))
|
||||||
|
|
||||||
@ -29,7 +30,7 @@ echo "Starting ${#VMS[*]} VMs on ${CPU} CPUs in ${CYCLES} cycle(s), waiting ${SL
|
|||||||
COUNTER=0
|
COUNTER=0
|
||||||
for i in ${VMS[*]}; do
|
for i in ${VMS[*]}; do
|
||||||
COUNTER=$((${COUNTER}+1))
|
COUNTER=$((${COUNTER}+1))
|
||||||
vmctl start ${i} ; sleep 5
|
vmctl start ${i} ; sleep ${DELAY}
|
||||||
if [ $COUNTER -eq $CPU ]; then
|
if [ $COUNTER -eq $CPU ]; then
|
||||||
sleep ${SLEEP}
|
sleep ${SLEEP}
|
||||||
COUNTER=0
|
COUNTER=0
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#
|
#
|
||||||
|
DELAY=0
|
||||||
SLEEP=30
|
SLEEP=30
|
||||||
CPU=$(($(sysctl -n hw.ncpuonline)-2))
|
CPU=$(($(sysctl -n hw.ncpuonline)-2))
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ echo "Stopping ${#VMS[*]} VMs on ${CPU} CPUs in ${CYCLES} cycle(s), waiting ${SL
|
|||||||
COUNTER=0
|
COUNTER=0
|
||||||
for i in ${VMS[*]}; do
|
for i in ${VMS[*]}; do
|
||||||
COUNTER=$((${COUNTER}+1))
|
COUNTER=$((${COUNTER}+1))
|
||||||
vmctl stop ${i}
|
vmctl stop ${i} ; sleep ${DELAY}
|
||||||
if [ $COUNTER -eq $CPU ]; then
|
if [ $COUNTER -eq $CPU ]; then
|
||||||
sleep ${SLEEP}
|
sleep ${SLEEP}
|
||||||
COUNTER=0
|
COUNTER=0
|
||||||
|
Loading…
Reference in New Issue
Block a user