Browse Source

shell scripts : add commas to SCRIPT,EXEDIR

pull/33/head
bolvan 6 years ago
parent
commit
d0cd265730
  1. 4
      install_bin.sh
  2. 9
      install_easy.sh
  3. 4
      ipset/create_ipset.sh
  4. 4
      ipset/get_antizapret.sh
  5. 4
      ipset/get_combined.sh
  6. 4
      ipset/get_config.sh
  7. 4
      ipset/get_hostlist.sh
  8. 4
      ipset/get_reestr.sh
  9. 4
      ipset/get_user.sh
  10. 8
      uninstall_easy.sh

4
install_bin.sh

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f "$0")
EXEDIR=$(dirname $SCRIPT) EXEDIR=$(dirname "$SCRIPT")
BINS=binaries BINS=binaries
BINDIR=$EXEDIR/$BINS BINDIR=$EXEDIR/$BINS

9
install_easy.sh

@ -2,8 +2,8 @@
# automated script for easy installing zapret # automated script for easy installing zapret
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f "$0")
EXEDIR=$(dirname $SCRIPT) EXEDIR=$(dirname "$SCRIPT")
ZAPRET_BASE=/opt/zapret ZAPRET_BASE=/opt/zapret
ZAPRET_CONFIG=$EXEDIR/config ZAPRET_CONFIG=$EXEDIR/config
@ -34,8 +34,8 @@ exitp()
[ $(id -u) -ne "0" ] && { [ $(id -u) -ne "0" ] && {
echo root is required echo root is required
exists sudo && exec sudo $0 exists sudo && exec sudo "$0"
exists su && exec su -c $0 exists su && exec su -c "$0"
echo su or sudo not found echo su or sudo not found
exitp 2 exitp 2
} }
@ -146,6 +146,7 @@ ask_list()
write_config_var() write_config_var()
{ {
# $1 - mode var # $1 - mode var
local M
eval M="\$$1" eval M="\$$1"
if [ -n "$M" ]; then if [ -n "$M" ]; then

4
ipset/create_ipset.sh

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
# create ipset from resolved ip's # create ipset from resolved ip's
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f "$0")
EXEDIR=$(dirname $SCRIPT) EXEDIR=$(dirname "$SCRIPT")
IPSET_OPT="hashsize 131072 maxelem 524288" IPSET_OPT="hashsize 131072 maxelem 524288"
IP2NET=$EXEDIR/../ip2net/ip2net IP2NET=$EXEDIR/../ip2net/ip2net

4
ipset/get_antizapret.sh

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
# get ip list from antizapret.prostovpn.org # get ip list from antizapret.prostovpn.org
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f "$0")
EXEDIR=$(dirname $SCRIPT) EXEDIR=$(dirname "$SCRIPT")
. "$EXEDIR/def.sh" . "$EXEDIR/def.sh"

4
ipset/get_combined.sh

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
# get rublacklist and resolve it # get rublacklist and resolve it
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f "$0")
EXEDIR=$(dirname $SCRIPT) EXEDIR=$(dirname "$SCRIPT")
. "$EXEDIR/def.sh" . "$EXEDIR/def.sh"

4
ipset/get_config.sh

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
# run script specified in config # run script specified in config
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f "$0")
EXEDIR=$(dirname $SCRIPT) EXEDIR=$(dirname "$SCRIPT")
. "$EXEDIR/../config" . "$EXEDIR/../config"

4
ipset/get_hostlist.sh

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
# get domain list. not IP # get domain list. not IP
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f "$0")
EXEDIR=$(dirname $SCRIPT) EXEDIR=$(dirname "$SCRIPT")
. "$EXEDIR/def.sh" . "$EXEDIR/def.sh"

4
ipset/get_reestr.sh

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
# get rublacklist and resolve it # get rublacklist and resolve it
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f "$0")
EXEDIR=$(dirname $SCRIPT) EXEDIR=$(dirname "$SCRIPT")
. "$EXEDIR/def.sh" . "$EXEDIR/def.sh"

4
ipset/get_user.sh

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
# resolve user host list # resolve user host list
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f "$0")
EXEDIR=$(dirname $SCRIPT) EXEDIR=$(dirname "$SCRIPT")
. "$EXEDIR/def.sh" . "$EXEDIR/def.sh"

8
uninstall_easy.sh

@ -2,8 +2,8 @@
# automated script for easy uninstalling zapret # automated script for easy uninstalling zapret
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f "$0")
EXEDIR=$(dirname $SCRIPT) EXEDIR=$(dirname "$SCRIPT")
GET_IPLIST_PREFIX=/ipset/get_ GET_IPLIST_PREFIX=/ipset/get_
exists() exists()
@ -25,8 +25,8 @@ exitp()
[ $(id -u) -ne "0" ] && { [ $(id -u) -ne "0" ] && {
echo root is required echo root is required
exists sudo && exec sudo $0 exists sudo && exec sudo "$0"
exists su && exec su -c $0 exists su && exec su -c "$0"
echo su or sudo not found echo su or sudo not found
exitp 2 exitp 2
} }

Loading…
Cancel
Save