mirror of https://github.com/pragma-/pbot.git
Compare commits
3 Commits
3b36894403
...
cc1445be90
Author | SHA1 | Date |
---|---|---|
Pragmatic Software | cc1445be90 | |
Pragmatic Software | 9ef521309a | |
Pragmatic Software | e25bde159f |
|
@ -41,6 +41,9 @@ RUN pip install git+https://github.com/garabik/unicode --break-system-packages
|
|||
# paren/prec
|
||||
RUN pip install 'pycparser==2.10' --break-system-packages
|
||||
|
||||
# cdecl
|
||||
RUN apt-get -y install cdecl
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
# Get PBot from GitHub
|
||||
|
|
|
@ -16,7 +16,7 @@ if (@args < 2) {
|
|||
$command = quotemeta($command);
|
||||
$command =~ s/\\ / /g;
|
||||
|
||||
my $result = `/usr/bin/cdecl -c $command`;
|
||||
my $result = `cdecl $command`;
|
||||
|
||||
chomp $result;
|
||||
$result =~ s/\n/, /g;
|
||||
|
|
|
@ -263,6 +263,11 @@ sub main() {
|
|||
|
||||
configure_context($context, $config);
|
||||
|
||||
if ($context->{revert} && $context->{health}) {
|
||||
print STDERR "-health and -revert cannot be used together; aborting.\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
# instructed to revert machine
|
||||
if ($context->{revert}) {
|
||||
if (exists $config->{aliases}->{$context->{'vm-domain'}}) {
|
||||
|
|
|
@ -83,6 +83,14 @@ In your instance of PBot, the `sh` and `cc`, etc, commands should now produce ou
|
|||
<pragma-> sh echo Hello world!
|
||||
<PBot> Hello world!
|
||||
|
||||
### Starting PBot VM again
|
||||
To start the PBot VM again, e.g. after a reboot:
|
||||
|
||||
cd applets/pbot-vm/host/bin
|
||||
virsh -c qemu:///system net-start vagrant-libvirt
|
||||
virsh -c qemu:///system snapshot-revert $PBOTVM_DOMAIN 1 # for each $PBOTVM_DOMAIN you need to start
|
||||
./vm-server
|
||||
|
||||
### Shutdown Vagrant Box
|
||||
|
||||
vagrant halt
|
||||
|
|
|
@ -353,6 +353,7 @@
|
|||
* [Initial virtual machine set-up complete](VirtualMachine.md#initial-virtual-machine-set-up-complete)
|
||||
* [Start PBot VM Host](VirtualMachine.md#start-pbot-vm-host)
|
||||
* [Test PBot](VirtualMachine.md#test-pbot)
|
||||
* [Starting PBot VM again](VirtualMachine.md#starting-pbot-vm-again)
|
||||
* [Adding additional VMs](VirtualMachine.md#adding-additional-vms)
|
||||
* [QEMU command from libvirt](VirtualMachine.md#qemu-command-from-libvirt)
|
||||
<!-- md-toc-end -->
|
||||
|
|
|
@ -510,6 +510,13 @@ In your instance of PBot, the `sh echo hello` command should output `hello`.
|
|||
<pragma-> sh echo hello
|
||||
<PBot> hello
|
||||
|
||||
## Starting PBot VM again
|
||||
To start the PBot VM again, e.g. after a reboot:
|
||||
|
||||
cd applets/pbot-vm/host/bin
|
||||
virsh snapshot-revert $PBOTVM_DOMAIN 1 # for each $PBOTVM_DOMAIN you need to start
|
||||
./vm-server
|
||||
|
||||
## Adding additional VMs
|
||||
You may add as many virtual machines as you like. The virtual machines can exist on different physical machines.
|
||||
Edit the [`vm-exec.json`](../applets/pbot-vm/host/config/vm-exec.json) configuration file with the details (IP addresses
|
||||
|
|
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
|||
# These are set by the /misc/update_version script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 4741,
|
||||
BUILD_REVISION => 4747,
|
||||
BUILD_DATE => "2024-04-10",
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue