1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #!/usr/bin/env bash
- ### BEG SCRIPT INFO
- #
- # Header:
- #
- # fname : "multitor"
- # cdate : "09.01.2018"
- # author : "Michał Żurawski <trimstray@gmail.com>"
- # tab_size : "2"
- # soft_tabs : "yes"
- #
- # Description:
- #
- # See README.md file for more information.
- #
- # The multitor has been completely rewritten on the basis of:
- # - Multi-TOR project written by Jan Seidl:
- # https://github.com/jseidl/Multi-TOR
- # - original source is (Sebastian Wain project):
- # http://blog.databigbang.com/distributed-scraping-with-multiple-tor-circuits/
- #
- # License:
- #
- # multitor, Copyright (C) 2018 Michał Żurawski
- #
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or
- # (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
- #
- ### END SCRIPT INFO
- # The array that store call parameters.
- # shellcheck disable=SC2034
- __init_params=()
- __script_params=("$@")
- # Store the name of the script and directory call.
- readonly _init_name="$(basename "$0")"
- readonly _init_directory="$(dirname "$(readlink -f "$0")")"
- # Set root directory.
- readonly _rel="${_init_directory}/.."
- # Directory structure.
- # shellcheck disable=SC2154
- readonly _src="${_rel}/src"
- readonly _lib="${_rel}/lib"
- readonly _etc="${_rel}/etc"
- readonly _tml="${_rel}/templates"
- # shellcheck disable=SC1090,SC1091
- source "${_src}/settings"
- # shellcheck disable=SC1090
- source "${_src}/helpers"
- # shellcheck disable=SC1090
- source "${_src}/__init__"
- # We pass arguments to the __main__ function.
- # It is required if you want to run on arguments type $1, $2, ...
- __main__ "${__script_params[@]}"
- _exit_ "0"
|