Fix if [[ -> if [
This commit is contained in:
parent
beecd93c2b
commit
e82340943b
12
bkctld
12
bkctld
|
@ -122,7 +122,7 @@ set_key() {
|
||||||
set_ip() {
|
set_ip() {
|
||||||
jail=$1
|
jail=$1
|
||||||
ip=$2
|
ip=$2
|
||||||
if [[ $ip = "all" || $ip = "0.0.0.0/0" ]]; then
|
if [ "$ip" = "all" ] || [ "$ip" = "0.0.0.0/0" ]; then
|
||||||
ips="0.0.0.0/0"
|
ips="0.0.0.0/0"
|
||||||
else
|
else
|
||||||
ips=$(get_ip $jail)
|
ips=$(get_ip $jail)
|
||||||
|
@ -545,22 +545,22 @@ main() {
|
||||||
log $subcommand
|
log $subcommand
|
||||||
;;
|
;;
|
||||||
"init")
|
"init")
|
||||||
if [[ -n "${jail}" ]]; then
|
if [ -n "${jail}" ]; then
|
||||||
log $subcommand $jail
|
log $subcommand $jail
|
||||||
else
|
else
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"key" | "port" | "ip")
|
"key" | "port" | "ip")
|
||||||
if [[ -n "${jail}" ]]; then
|
if [ -n "${jail}" ]; then
|
||||||
log params $jail $subcommand $option
|
log params $jail $subcommand $option
|
||||||
else
|
else
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"start" | "stop" | "reload" | "restart" | "sync" | "update" | "remove")
|
"start" | "stop" | "reload" | "restart" | "sync" | "update" | "remove")
|
||||||
if [[ -n "${jail}" ]]; then
|
if [ -n "${jail}" ]; then
|
||||||
if [[ "${jail}" = "all" ]]; then
|
if [ "${jail}" = "all" ]; then
|
||||||
for jail in $(ls $JAILDIR); do
|
for jail in $(ls $JAILDIR); do
|
||||||
case $subcommand in
|
case $subcommand in
|
||||||
"start")
|
"start")
|
||||||
|
@ -599,7 +599,7 @@ main() {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"status")
|
"status")
|
||||||
if [[ -z "${jail}" ]]; then
|
if [ -z "${jail}" ]; then
|
||||||
for jail in $(ls $JAILDIR); do
|
for jail in $(ls $JAILDIR); do
|
||||||
sub_$subcommand $jail
|
sub_$subcommand $jail
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue