3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-05 19:49:32 +01:00

pbot-vm: simplify network script slightly

This commit is contained in:
Pragmatic Software 2024-04-12 13:12:41 -07:00
parent 111f3bd2e7
commit e4cb6ceff6
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 7 additions and 13 deletions

View File

@ -36,15 +36,6 @@ DisableNetwork() {
}
Main() {
case $1 in
on|off) ;;
*)
echo "Invalid command \`$1\`; usage: $Usage"
exit 1 ;;
esac
Toggle="$1"
case $2 in
iptables|ipt)
Mode="iptables" ;;
@ -57,13 +48,16 @@ Main() {
exit 1 ;;
esac
case $Toggle in
"on")
case $1 in
on)
echo "Enabling networking with $Mode"
EnableNetwork "$Mode" ;;
"off")
off)
echo "Disabling networking with $Mode"
DisableNetwork "$Mode" ;;
*)
echo "Invalid command \`$1\`; usage: $Usage"
exit 1 ;;
esac
}

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4748,
BUILD_REVISION => 4749,
BUILD_DATE => "2024-04-12",
};