forked from evolix/evobackup
Do not create dirs in bkctld script
This commit is contained in:
parent
183bc05ec4
commit
d09d0b0572
1
bkctld
1
bkctld
|
@ -16,7 +16,6 @@ set -u
|
||||||
[ -d '/usr/lib/bkctld' ] && LIBDIR='/usr/lib/bkctld'
|
[ -d '/usr/lib/bkctld' ] && LIBDIR='/usr/lib/bkctld'
|
||||||
. "${LIBDIR}/config"
|
. "${LIBDIR}/config"
|
||||||
|
|
||||||
mkdir -p "${CONFDIR}" "${JAILDIR}" "${INCDIR}" "${INDEX_DIR}"
|
|
||||||
subcommand="${1:-}"
|
subcommand="${1:-}"
|
||||||
jail="${2:-}"
|
jail="${2:-}"
|
||||||
option="${3:-}"
|
option="${3:-}"
|
||||||
|
|
|
@ -12,6 +12,7 @@ if [ ! -n "${jail}" ]; then
|
||||||
fi
|
fi
|
||||||
[ -d "${JAILDIR}/${jail}" ] && error "${jail} : trying to create existant jail"
|
[ -d "${JAILDIR}/${jail}" ] && error "${jail} : trying to create existant jail"
|
||||||
|
|
||||||
|
mkdir -p "${CONFDIR}" "${JAILDIR}"
|
||||||
sshd_config="${TPLDIR}/sshd_config"
|
sshd_config="${TPLDIR}/sshd_config"
|
||||||
inctpl="${TPLDIR}/inc.tpl"
|
inctpl="${TPLDIR}/inc.tpl"
|
||||||
[ -f "${LOCALTPLDIR}/sshd_config" ] && sshd_config="${LOCALTPLDIR}/sshd_config"
|
[ -f "${LOCALTPLDIR}/sshd_config" ] && sshd_config="${LOCALTPLDIR}/sshd_config"
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
LIBDIR="$(dirname $0)" && . "${LIBDIR}/config"
|
LIBDIR="$(dirname $0)" && . "${LIBDIR}/config"
|
||||||
|
|
||||||
|
mkdir -p "${INDEX_DIR}"
|
||||||
lsof "${IDX_FILE}" >/dev/null 2>&1 || nohup sh -s -- <<EOF >/dev/null 2>&1 &
|
lsof "${IDX_FILE}" >/dev/null 2>&1 || nohup sh -s -- <<EOF >/dev/null 2>&1 &
|
||||||
ionice -c3 "${DUC}" index -d "${IDX_FILE}" "${JAILDIR}"
|
ionice -c3 "${DUC}" index -d "${IDX_FILE}" "${JAILDIR}"
|
||||||
touch "${INDEX_DIR}/.lastrun.duc"
|
touch "${INDEX_DIR}/.lastrun.duc"
|
||||||
|
|
Loading…
Reference in a new issue