aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--git-create8
2 files changed, 8 insertions, 3 deletions
diff --git a/README.md b/README.md
index d92de30..e8833ee 100644
--- a/README.md
+++ b/README.md
@@ -110,7 +110,8 @@ root-readme=:README.md
enable-git-config=0
remove-suffix=1
scan-path=/home/git/repositories/public
-main-title=Мои репозитории
+root-title=Мои репозитории
+root-desc=Мое персональное Git-хранилище проектов
snapshots=tar.gz zip
```
diff --git a/git-create b/git-create
index f90b66b..89f6217 100644
--- a/git-create
+++ b/git-create
@@ -25,10 +25,14 @@ if [ $? -eq 0 ]; then
# Если репозиторий публичный, настраиваем параметры для cgit на сервере
if [ "$TYPE" == "public" ]; then
ssh ${SERVER} "touch ${REMOTE_PATH}/git-daemon-export-ok"
+
+ # Если описание введено, пишем его СТРОГО в файл description
if [ ! -z "$DESC" ]; then
- # Прописываем описание напрямую в серверный git config
- ssh ${SERVER} "git --git-dir=${REMOTE_PATH} config gitweb.description \"$DESC\""
+ ssh ${SERVER} "echo \"$DESC\" > ${REMOTE_PATH}/description"
fi
+
+ # На всякий случай выставляем права для www-data прямо из скрипта
+ ssh ${SERVER} "chown -R git:www-data ${REMOTE_PATH} && chmod -R 750 ${REMOTE_PATH}"
fi
# Привязка локальной папки