add basic update for base setup
This commit is contained in:
@@ -61,11 +61,20 @@ GIT_WEBHOOK_BASE_FOLDER="${GIT_WEBHOOK_BASE_FOLDER%/}/"
|
||||
|
||||
if [ -d "${GIT_WEBHOOK_BASE_FOLDER}" ]; then
|
||||
echo "Base folder already exists, update check";
|
||||
echo "[TODO] -> Not implemented exit";
|
||||
# check folders
|
||||
# check folder ACL
|
||||
# copy scripts
|
||||
# copy default config
|
||||
echo "[TODO] -> Not implemented: check folder, check ACL";
|
||||
# copy scripts & default config
|
||||
echo "~ Copy basic script and config files";
|
||||
# git_pull.sh, init.sh, new_clone.sh, webhook.default.cfg
|
||||
cp "${BASE_FOLDER}new_clone.sh" "${BASE_FOLDER}init.sh" "${BASE_FOLDER}git_pull.sh" "${GIT_WEBHOOK_BASE_FOLDER}${SCRIPT_FOLDER}";
|
||||
cp "${CONFIG_BASE}/webhook.default.cfg" "${GIT_WEBHOOK_BASE_FOLDER}${CONFIG_FOLDER}";
|
||||
# and make sure they are all owned by the correct user
|
||||
chown "${SUDO_USER}" \
|
||||
"${BASE_FOLDER}new_clone.sh" \
|
||||
"${BASE_FOLDER}init.sh" \
|
||||
"${BASE_FOLDER}git_pull.sh" \
|
||||
"${CONFIG_BASE}/webhook.default.cfg";
|
||||
# check config entries missing
|
||||
exit;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user