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:
parent
111f3bd2e7
commit
e4cb6ceff6
@ -36,15 +36,6 @@ DisableNetwork() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Main() {
|
Main() {
|
||||||
case $1 in
|
|
||||||
on|off) ;;
|
|
||||||
*)
|
|
||||||
echo "Invalid command \`$1\`; usage: $Usage"
|
|
||||||
exit 1 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
Toggle="$1"
|
|
||||||
|
|
||||||
case $2 in
|
case $2 in
|
||||||
iptables|ipt)
|
iptables|ipt)
|
||||||
Mode="iptables" ;;
|
Mode="iptables" ;;
|
||||||
@ -57,13 +48,16 @@ Main() {
|
|||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $Toggle in
|
case $1 in
|
||||||
"on")
|
on)
|
||||||
echo "Enabling networking with $Mode"
|
echo "Enabling networking with $Mode"
|
||||||
EnableNetwork "$Mode" ;;
|
EnableNetwork "$Mode" ;;
|
||||||
"off")
|
off)
|
||||||
echo "Disabling networking with $Mode"
|
echo "Disabling networking with $Mode"
|
||||||
DisableNetwork "$Mode" ;;
|
DisableNetwork "$Mode" ;;
|
||||||
|
*)
|
||||||
|
echo "Invalid command \`$1\`; usage: $Usage"
|
||||||
|
exit 1 ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4748,
|
BUILD_REVISION => 4749,
|
||||||
BUILD_DATE => "2024-04-12",
|
BUILD_DATE => "2024-04-12",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user