mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-22 23:45:10 +00:00
remove unneeded BOTADMIN TOKENFILE variables
This commit is contained in:
parent
3407b0500b
commit
79f58cd7fd
10
bashbot.sh
10
bashbot.sh
@ -26,7 +26,7 @@
|
|||||||
# 8 - curl/wget missing
|
# 8 - curl/wget missing
|
||||||
# 10 - not bash!
|
# 10 - not bash!
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v1.21-dev-38-g29f2ce8
|
#### $$VERSION$$ v1.21-dev-42-g3407b05
|
||||||
##################################################################
|
##################################################################
|
||||||
# shellcheck disable=SC2140,SC2031,SC2120,SC1091,SC1117,SC2059
|
# shellcheck disable=SC2140,SC2031,SC2120,SC1091,SC1117,SC2059
|
||||||
|
|
||||||
@ -190,8 +190,6 @@ JSONSHFILE="${BASHBOT_JSONSH:-${SCRIPTDIR}/JSON.sh/JSON.sh}"
|
|||||||
|
|
||||||
# file locations based on ENVIRONMENT
|
# file locations based on ENVIRONMENT
|
||||||
BOTCONFIG="${BASHBOT_ETC:-.}/botconfig"
|
BOTCONFIG="${BASHBOT_ETC:-.}/botconfig"
|
||||||
TOKENFILE="${BASHBOT_ETC:-.}/token"
|
|
||||||
BOTADMIN="${BASHBOT_ETC:-.}/botadmin"
|
|
||||||
BOTACL="${BASHBOT_ETC:-.}/botacl"
|
BOTACL="${BASHBOT_ETC:-.}/botacl"
|
||||||
DATADIR="${BASHBOT_VAR:-.}/data-bot-bash"
|
DATADIR="${BASHBOT_VAR:-.}/data-bot-bash"
|
||||||
BLOCKEDFILE="${BASHBOT_VAR:-.}/blocked"
|
BLOCKEDFILE="${BASHBOT_VAR:-.}/blocked"
|
||||||
@ -312,7 +310,7 @@ GETFILE_URL=$URL'/getFile'
|
|||||||
#################
|
#################
|
||||||
# BASHBOT COMMON functions
|
# BASHBOT COMMON functions
|
||||||
|
|
||||||
declare -rx SCRIPT SCRIPTDIR MODULEDIR RUNDIR ADDONDIR TOKENFILE BOTADMIN BOTACL DATADIR COUNTFILE
|
declare -rx SCRIPT SCRIPTDIR MODULEDIR RUNDIR ADDONDIR BOTACL DATADIR COUNTFILE
|
||||||
declare -rx BOTTOKEN URL ME_URL UPD_URL GETFILE_URL
|
declare -rx BOTTOKEN URL ME_URL UPD_URL GETFILE_URL
|
||||||
|
|
||||||
declare -ax CMD
|
declare -ax CMD
|
||||||
@ -1134,8 +1132,8 @@ bot_init() {
|
|||||||
[ -w "bashbot.rc" ] && sed -i '/^[# ]*runas=/ s/runas=.*$/runas="'$TOUSER'"/' "bashbot.rc"
|
[ -w "bashbot.rc" ] && sed -i '/^[# ]*runas=/ s/runas=.*$/runas="'$TOUSER'"/' "bashbot.rc"
|
||||||
chmod 711 .
|
chmod 711 .
|
||||||
chmod -R o-w ./*
|
chmod -R o-w ./*
|
||||||
chmod -R u+w "${COUNTFILE}"* "${BLOCKEDFILE}"* "${DATADIR}" "${BOTADMIN}" logs "${LOGDIR}/"*.log 2>/dev/null
|
chmod -R u+w "${COUNTFILE}"* "${BLOCKEDFILE}"* "${DATADIR}" logs "${LOGDIR}/"*.log 2>/dev/null
|
||||||
chmod -R o-r,o-w "${COUNTFILE}"* "${BLOCKEDFILE}"* "${DATADIR}" "${TOKENFILE}" "${BOTADMIN}" "${BOTACL}" 2>/dev/null
|
chmod -R o-r,o-w "${COUNTFILE}"* "${BLOCKEDFILE}"* "${DATADIR}" "${BOTACL}" 2>/dev/null
|
||||||
# jsshDB must writeable by owner
|
# jsshDB must writeable by owner
|
||||||
find . -name '*.jssh*' -exec chmod u+w \{\} +
|
find . -name '*.jssh*' -exec chmod u+w \{\} +
|
||||||
chown -R "$TOUSER" . ./*
|
chown -R "$TOUSER" . ./*
|
||||||
|
Loading…
Reference in New Issue
Block a user