mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
fix upgrade, fix file permission
This commit is contained in:
parent
276121c1dd
commit
79e59e4dd4
3 changed files with 4 additions and 18 deletions
|
@ -108,10 +108,7 @@ done
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configure GitLab..." --weight=28
|
ynh_script_progression --message="Configure GitLab..." --weight=28
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$config_path/gitlab.rb"
|
|
||||||
|
|
||||||
mkdir -p $config_path
|
mkdir -p $config_path
|
||||||
|
|
||||||
cp -f $YNH_APP_BASEDIR/conf/gitlab.rb "$config_path/gitlab.rb"
|
cp -f $YNH_APP_BASEDIR/conf/gitlab.rb "$config_path/gitlab.rb"
|
||||||
ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+")
|
ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+")
|
||||||
|
|
||||||
|
@ -122,8 +119,6 @@ generated_external_url="https://$domain${path_url%/}"
|
||||||
|
|
||||||
ynh_add_config --template="$YNH_APP_BASEDIR/conf/gitlab.rb" --destination="$config_path/gitlab.rb"
|
ynh_add_config --template="$YNH_APP_BASEDIR/conf/gitlab.rb" --destination="$config_path/gitlab.rb"
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$config_path/gitlab.rb"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECONFIGURE GITLAB
|
# RECONFIGURE GITLAB
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -169,7 +169,8 @@ ynh_script_progression --message="Preconfigure GitLab..." --weight=1
|
||||||
mkdir -p $config_path
|
mkdir -p $config_path
|
||||||
|
|
||||||
touch "$config_path/gitlab-persistent.rb"
|
touch "$config_path/gitlab-persistent.rb"
|
||||||
chown admin: "$config_path/gitlab-persistent.rb"
|
chown root:root "$config_path/gitlab-persistent.rb"
|
||||||
|
chmod 640 "$config_path/gitlab-persistent.rb"
|
||||||
|
|
||||||
cp -f $YNH_APP_BASEDIR/conf/gitlab.rb "$config_path/gitlab.rb"
|
cp -f $YNH_APP_BASEDIR/conf/gitlab.rb "$config_path/gitlab.rb"
|
||||||
ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+")
|
ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+")
|
||||||
|
@ -178,12 +179,6 @@ generated_external_url="https://$domain${path_url%/}"
|
||||||
|
|
||||||
ynh_add_config --template="$YNH_APP_BASEDIR/conf/gitlab.rb" --destination="$config_path/gitlab.rb"
|
ynh_add_config --template="$YNH_APP_BASEDIR/conf/gitlab.rb" --destination="$config_path/gitlab.rb"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$config_path/gitlab.rb"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -296,10 +296,7 @@ done
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reconfigure GitLab..." --weight=13
|
ynh_script_progression --message="Reconfigure GitLab..." --weight=13
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$config_path/gitlab.rb"
|
|
||||||
|
|
||||||
mkdir -p $config_path
|
mkdir -p $config_path
|
||||||
|
|
||||||
cp -f $YNH_APP_BASEDIR/conf/gitlab.rb "$config_path/gitlab.rb"
|
cp -f $YNH_APP_BASEDIR/conf/gitlab.rb "$config_path/gitlab.rb"
|
||||||
ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+")
|
ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+")
|
||||||
|
|
||||||
|
@ -307,10 +304,9 @@ generated_external_url="https://$domain${path_url%/}"
|
||||||
|
|
||||||
ynh_add_config --template="$YNH_APP_BASEDIR/conf/gitlab.rb" --destination="$config_path/gitlab.rb"
|
ynh_add_config --template="$YNH_APP_BASEDIR/conf/gitlab.rb" --destination="$config_path/gitlab.rb"
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$config_path/gitlab.rb"
|
|
||||||
|
|
||||||
touch "$config_path/gitlab-persistent.rb"
|
touch "$config_path/gitlab-persistent.rb"
|
||||||
chown admin: "$config_path/gitlab-persistent.rb"
|
chown root:root "$config_path/gitlab-persistent.rb"
|
||||||
|
chmod 640 "$config_path/gitlab-persistent.rb"
|
||||||
|
|
||||||
gitlab-ctl reconfigure
|
gitlab-ctl reconfigure
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue