archives/gitlab-shell: new aport
This commit is contained in:
parent
f690124a2f
commit
9f6c072b60
6 changed files with 270 additions and 0 deletions
23
archives/gitlab-shell/gitlab-shell.post-install
Normal file
23
archives/gitlab-shell/gitlab-shell.post-install
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
keys_file='/var/lib/gitlab/.ssh/authorized_keys'
|
||||
|
||||
if [ ! -f "$keys_file" ]; then
|
||||
keys_dir="$(dirname "$keys_file")"
|
||||
echo "* Initializing authorized_keys file in $keys_dir" 1>&2
|
||||
|
||||
mkdir -m0700 -p "$keys_dir"
|
||||
chown git:git "$keys_dir"
|
||||
|
||||
touch "$keys_file"
|
||||
chmod 0600 "$keys_file"
|
||||
chown git:git "$keys_file"
|
||||
fi
|
||||
|
||||
cat <<EOF >&2
|
||||
*
|
||||
* GitLab Shell has been initialized. Read /etc/gitlab/gitlab-shell.yml and
|
||||
* modify settings as need.
|
||||
*
|
||||
EOF
|
Loading…
Add table
Add a link
Reference in a new issue