commit a20d2ad129ee9b3e94e91ed278376bf0b735e4b7
parent 3434229610e0d4e8deef8569374cd024b86b3cb3
Author: andersuno <anders@desk.andersuno.nu>
Date: Thu, 4 Aug 2022 20:01:14 +0200
Added '|| return's to make bash-ls happy
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/start.sh b/start.sh
@@ -3,7 +3,7 @@
# If there is some public key in keys folder
# then it copies its contain in authorized_keys file
if [ "$(ls -A /git-server/keys/)" ]; then
- cd /home/git
+ cd /home/git || return
cat /git-server/keys/*.pub > .ssh/authorized_keys
chown -R git:git .ssh
chmod 700 .ssh
@@ -13,13 +13,13 @@ fi
# Checking permissions and fixing SGID bit in repos folder
# More info: https://github.com/jkarlosb/git-server-docker/issues/1
if [ -d /git-server/repos/ ]; then
- cd /git-server/repos
+ cd /git-server/repos || return
chown -R git:git .
chmod -R ug+rwX .
find . -type d -exec chmod g+s '{}' +
fi
if [ -d /git-server/public-html/ ]; then
- cd /git-server/public-html
+ cd /git-server/public-html || return
chown -R git:git .
chmod -R ug+rwX .
chmod -R o+r .