Adds SCRIPT_DIR to replace relative paths for conf, db, etc.
parent
329fc10ff0
commit
d558096288
6
jilo
6
jilo
|
@ -6,8 +6,10 @@
|
||||||
# Bash script for Jitsi Meet components (Videobridge, Jicofo, etc.) logs parsing
|
# Bash script for Jitsi Meet components (Videobridge, Jicofo, etc.) logs parsing
|
||||||
###
|
###
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" #"
|
||||||
|
|
||||||
### Configuration file (overrides default configs)
|
### Configuration file (overrides default configs)
|
||||||
CONFIG_FILE="./jilo.conf"
|
CONFIG_FILE="$SCRIPT_DIR/jilo.conf"
|
||||||
|
|
||||||
### Default configuration
|
### Default configuration
|
||||||
|
|
||||||
|
@ -19,7 +21,7 @@ DEFAULT_JICOFO_PROCESS="jicofo"
|
||||||
# Default database type (sqlite, mysql|mariadb)
|
# Default database type (sqlite, mysql|mariadb)
|
||||||
DEFAULT_DB_TYPE="sqlite"
|
DEFAULT_DB_TYPE="sqlite"
|
||||||
# Default SQLite database file
|
# Default SQLite database file
|
||||||
DEFAULT_DB="./jilo.db"
|
DEFAULT_DB="$SCRIPT_DIR/jilo.db"
|
||||||
# Default MySQL/MariaDB configuration
|
# Default MySQL/MariaDB configuration
|
||||||
DEFAULT_MYSQL_HOST="localhost"
|
DEFAULT_MYSQL_HOST="localhost"
|
||||||
DEFAULT_MYSQL_USER="jilo"
|
DEFAULT_MYSQL_USER="jilo"
|
||||||
|
|
8
jilo-cli
8
jilo-cli
|
@ -7,15 +7,17 @@
|
||||||
# Command line interface (jilo-cli)
|
# Command line interface (jilo-cli)
|
||||||
###
|
###
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" #"
|
||||||
|
|
||||||
### Configuration file (overrides default configs)
|
### Configuration file (overrides default configs)
|
||||||
CONFIG_FILE="./jilo.conf"
|
CONFIG_FILE="$SCRIPT_DIR/jilo.conf"
|
||||||
|
|
||||||
### Default configuration
|
### Default configuration
|
||||||
|
|
||||||
# Default database type (sqlite, mysql|mariadb)
|
# Default database type (sqlite, mysql|mariadb)
|
||||||
DEFAULT_DB_TYPE="sqlite"
|
DEFAULT_DB_TYPE="sqlite"
|
||||||
# Default SQLite database file
|
# Default SQLite database file
|
||||||
DEFAULT_DB="./jilo.db"
|
DEFAULT_DB="$SCRIPT_DIR/jilo.db"
|
||||||
# Default MySQL/MariaDB configuration
|
# Default MySQL/MariaDB configuration
|
||||||
DEFAULT_MYSQL_HOST="localhost"
|
DEFAULT_MYSQL_HOST="localhost"
|
||||||
DEFAULT_MYSQL_USER="jilo"
|
DEFAULT_MYSQL_USER="jilo"
|
||||||
|
@ -265,8 +267,8 @@ case "$cmd" in
|
||||||
if [[ "$time_range_specified" == true ]]; then
|
if [[ "$time_range_specified" == true ]]; then
|
||||||
db_stats_conferences_time=$(printf "$db_stats_conferences_time_template" "$from_time" "$until_time")
|
db_stats_conferences_time=$(printf "$db_stats_conferences_time_template" "$from_time" "$until_time")
|
||||||
db_query "$db_stats_conferences_time"
|
db_query "$db_stats_conferences_time"
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
exit 0
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in New Issue