mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
Merge branch 'develop'
This commit is contained in:
commit
329fbfdb26
2 changed files with 29 additions and 1 deletions
|
@ -43,7 +43,15 @@
|
||||||
"example": "/example",
|
"example": "/example",
|
||||||
"default": "/example"
|
"default": "/example"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "admin",
|
||||||
|
"type": "user",
|
||||||
|
"ask": {
|
||||||
|
"en": "Choose an admin user",
|
||||||
|
"fr": "Choisissez l’administrateur"
|
||||||
|
},
|
||||||
|
"example": "johndoe"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|
|
@ -19,6 +19,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
|
|
||||||
# Source YunoHost helpers
|
# Source YunoHost helpers
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
@ -26,6 +27,8 @@ source /usr/share/yunohost/helpers
|
||||||
# Save app settings
|
# Save app settings
|
||||||
ynh_app_setting_set "$app" is_public "$is_public"
|
ynh_app_setting_set "$app" is_public "$is_public"
|
||||||
|
|
||||||
|
mailadmin=$(ynh_user_get_info $admin mail)
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
sudo yunohost app checkurl "${domain}${path_url}" -a "$app" \
|
sudo yunohost app checkurl "${domain}${path_url}" -a "$app" \
|
||||||
|| ynh_die "Path not available: ${domain}${path_url}"
|
|| ynh_die "Path not available: ${domain}${path_url}"
|
||||||
|
@ -42,8 +45,25 @@ sudo apt-get install -yy gitlab-ce
|
||||||
|
|
||||||
|
|
||||||
# Gitlab configuration
|
# Gitlab configuration
|
||||||
|
|
||||||
|
sed -i "s@GENERATED_EXTERNAL_URL@https://$domain@" ../conf/gitlab.rb
|
||||||
|
sed -i "s@PORT@$port@" ../conf/gitlab.rb
|
||||||
|
|
||||||
|
sudo cp -f ../conf/gitlab.rb /etc/gitlab/gitlab.rb
|
||||||
sudo gitlab-ctl reconfigure
|
sudo gitlab-ctl reconfigure
|
||||||
|
|
||||||
|
echo $admin
|
||||||
|
echo $mailadmin
|
||||||
|
|
||||||
|
echo "newuser = User.new({ \"email\"=>'$mailadmin', \"username\"=>'$admin', \"name\"=>'$admin', \"password\"=>'12345678'})
|
||||||
|
newuser.admin = true
|
||||||
|
newuser.confirmed_at = Time.now
|
||||||
|
newuser.confirmation_token = nil
|
||||||
|
newuser.save" | sudo gitlab-rails console
|
||||||
|
|
||||||
|
sudo gitlab-ctl reconfigure
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
|
|
Loading…
Add table
Reference in a new issue