Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

GitLab – Site looks funky – CSS Issue

Posted on November 29, 2016 By David Kittell

It’s rare with the latest updates but sometimes the CSS doesn’t seem to load, this code may help if/when you run into the problem

#!/bin/sh

#  FixGitLabCSS.sh
#
#  This script will fix CSS and GUI related issues.
#
#  Created by David Kittell on 11/2/16.
#

clear

if [ -z ${1+x} ]; then
    echo -e "NOTE: Running this script will temporarily disable GitLab and boot all users out.\nAre you sure you want to do this? [y/n]"
    read sAcceptResponsibility
else
    declare sAcceptResponsibility=$1
fi

case $sAcceptResponsibility in
    'y')
        echo 'Running Initial GitLab CSS Fix'
        sudo gitlab-ctl reconfigure

        echo 'Done running Initial GitLab CSS Fix, did that fix the problem? [y/n]'
        read sFixedStatus

        case $sFixedStatus in
            'y')
                echo 'Closing shell script'
                ;;
            'n')
                echo 'Running Secondary GitLab CSS Fix'
                sudo gitlab-rake cache:clear
                sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads
                sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} \;
                sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} \;
                sudo chown -R git:git /var/opt/gitlab/git-data/repositories
                sudo gitlab-ctl restart
                sudo gitlab-ctl reconfigure

                echo 'Done running Secondary GitLab CSS Fix, did that fix the problem? [y/n]'
                read sFixedStatus1

                case $sFixedStatus1 in
                    'y')
                        echo 'Closing shell script'
                        ;;
                    'n')
                        echo 'Restarting Server'
                        sudo shutdown -r now
                        ;;
                    esac
                ;;
        esac
        ;;
    *)
        echo 'Closing shell script without running GitLab CSS Fix'
        ;;
esac
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

CentOS Code Fedora GitLab Red Hat UNIX UNIX Shell Scripts

Post navigation

Previous post
Next post

Related Posts

jQuery – Auto Complete Off

Posted on March 14, 2014October 26, 2015

$(document).ready(function(){ $(‘form’).attr(‘autocomplete’, ‘off’); }); Originally Posted on March 14, 2014Last Updated on October 26, 2015 All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what…

Read More

Prevent Browser Cache

Posted on August 21, 2013October 26, 2015

Response.Expires = 0 Response.Expiresabsolute = Now() – 1 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "no-cache" <cfheader name="expires" value="#now()#"> <cfheader name="pragma" value="no-cache"> <cfheader name="cache-control" value="no-cache, no-store, must-revalidate"> <meta http-equiv="expires" content="Mon, 06 Jan 1990 00:00:01 GMT"> <% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader ("Expires", 0); //prevents caching at the proxy server…

Read More

Bash – Unix – Identify Distribution (What OS Am I On)

Posted on June 4, 2020August 17, 2024

Unix Identification is a script that originated with VMWare but I have added some other systems to the script. No Install Option /bin/bash -c "$(curl -fsSL https://gitlab.com/Kittell-Projects/Unix/unixidentification/raw/master/UnixIdentification.sh)" $ /bin/bash -c "$(curl -fsSL https://gitlab.com/Kittell-Projects/Unix/unixidentification/raw/master/UnixIdentification.sh)" What details would you like to see? -a is for all details. -d is for full OS…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes