Here is little patch to migrate from override.conf to gitlab-user.conf in 
postinst.
Feel free to use or modify or discard ;)

Libor
diff -ur a/debian/postinst b/debian/postinst
--- a/debian/postinst	2018-02-14 12:52:35.904334762 +0100
+++ b/debian/postinst	2018-02-14 12:58:49.583882426 +0100
@@ -268,11 +268,15 @@
         path=/etc/systemd/system/gitlab-${service}.service.d
         mkdir -p $path
         if [ -e $path/override.conf ]; then
-          echo "$path/override.conf already exist"
+          # Disable user in override.conf
+          sed -i "s/^\( *\)\(User=.*\)/\1#\2/" $path/override.conf
+        fi
+        if [ -e $path/gitlab-user.conf ]; then
+          echo "$path/gitlab-user.conf already exist"
           # Make sure only gitlab user is updated
-          sed -i "s/^ *User=.*/User=$gitlab_user/" $path/override.conf
+          sed -i "s/^ *User=.*/User=$gitlab_user/" $path/gitlab-user.conf
         else
-          printf "[Service]\nUser=${gitlab_user}\n" > $path/override.conf
+          printf "[Service]\nUser=${gitlab_user}\n" > $path/gitlab-user.conf
         fi
       done
 
_______________________________________________
Pkg-ruby-extras-maintainers mailing list
Pkg-ruby-extras-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ruby-extras-maintainers

Reply via email to