mktemp -d first

This commit is contained in:
AJ ONeal 2018-06-23 18:35:33 -06:00
parent be13f167bd
commit 76ae6cc501
2 changed files with 4 additions and 4 deletions

6
.gitignore vendored
View File

@ -6,9 +6,9 @@ bin/npx
bin/telebit bin/telebit
bin/telebitd bin/telebitd
bin/telebit_uninstall bin/telebit_uninstall
etc/ ./etc/
include/ ./include/
share/ ./share/
# Logs # Logs
logs logs

View File

@ -77,7 +77,6 @@ fi
echo "" echo ""
my_tmp="$(mktemp -d)"
#TELEBIT_TMP="$my_tmp/telebit" #TELEBIT_TMP="$my_tmp/telebit"
TELEBIT_REAL_PATH=${TELEBIT_PATH:-} TELEBIT_REAL_PATH=${TELEBIT_PATH:-}
TELEBIT_TMP=${TELEBIT_PATH:-} TELEBIT_TMP=${TELEBIT_PATH:-}
@ -103,6 +102,7 @@ real_sudo_cmd=$soft_sudo_cmd
real_sudo_cmde=$soft_sudo_cmde real_sudo_cmde=$soft_sudo_cmde
set +e set +e
my_tmp="$(mktemp -d)"
mkdir -p $my_tmp "$TELEBIT_REAL_PATH" "$TELEBIT_REAL_PATH/etc" "$TELEBIT_REAL_PATH/var/log" 2>/dev/null mkdir -p $my_tmp "$TELEBIT_REAL_PATH" "$TELEBIT_REAL_PATH/etc" "$TELEBIT_REAL_PATH/var/log" 2>/dev/null
chown -R $(id -u -n):$(id -g -n) "$TELEBIT_REAL_PATH" 2>/dev/null chown -R $(id -u -n):$(id -g -n) "$TELEBIT_REAL_PATH" 2>/dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then