Skip to content
Snippets Groups Projects
Commit abd04436 authored by Gabriel Mazetto's avatar Gabriel Mazetto :spy_tone1:
Browse files

Symlink gitlab-geo-psql to /usr/bin when available

parent 159508a4
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
#!/bin/bash
#
# Symlink the ctl commands
DEST_DIR=${1:-/opt/gitlab}
 
usr_bin_symlinks="\
${DEST_DIR}/bin/gitlab-ctl \
${DEST_DIR}/bin/gitlab-rake \
${DEST_DIR}/bin/gitlab-rails \
${DEST_DIR}/bin/gitlab-psql \
"
symlink_command="ln -sf ${usr_bin_symlinks} /usr/bin/"
usr_bin_symlinks=(
"${DEST_DIR}/bin/gitlab-ctl"
"${DEST_DIR}/bin/gitlab-rake"
"${DEST_DIR}/bin/gitlab-rails"
"${DEST_DIR}/bin/gitlab-psql"
"${DEST_DIR}/bin/gitlab-geo-psql"
)
 
error_exit()
{
Loading
Loading
@@ -19,7 +19,12 @@ error_exit()
 
create_symlinks()
{
${symlink_command} || error_exit "Failed to create symlinks in /usr/bin"
for symlink in "${usr_bin_symlinks[@]}"
do
if [ -f $symlink ]; then
ln -sf $symlink /usr/bin || error_exit "Failed to create symlinks in /usr/bin"
fi
done
}
 
create_symlinks
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment