Skip to content

Instantly share code, notes, and snippets.

@aursu
aursu / docker-learning-ref.note.md
Created January 12, 2018 12:37
URLs related to docker (Training, Examples etc)
@aursu
aursu / check-ssl-exp.sh
Created June 6, 2018 10:49
Check SSL expiration
echo | openssl s_client -connect gitlab.dev2.gface.de:443 2>/dev/null | sed -n '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/p' | openssl x509 -dates -noout
#!/bin/bash
unknown_os ()
{
echo "Unfortunately, your operating system distribution and version are not supported by this script."
echo
echo "You can override the OS detection by setting os= and dist= prior to running this script."
echo "You can find a list of supported OSes and distributions on our website: https://packages.gitlab.com/docs#os_distro_version"
echo
echo "For example, to force CentOS 6: os=el dist=6 ./script.sh"
[gitlab_gitlab-ee]
name=gitlab_gitlab-ee
baseurl=https://packages.gitlab.com/gitlab/gitlab-ee/el/7/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey
https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
@aursu
aursu / gitlab-pre.sh
Created June 7, 2018 11:40
GitLab preinstall scriptlet (using /bin/sh):
#!/bin/sh
# GitLab pre-install script
DEST_DIR=/opt/gitlab
NEW_MAJOR_VERSION=10
NEW_MINOR_VERSION=10.8
mkdir -p /var/log/gitlab/reconfigure
skip_migrations_file=/etc/gitlab/skip-auto-migrations
@aursu
aursu / gitlab-post.sh
Created June 7, 2018 11:46
GitLab postinstall scriptlet (using /bin/sh):
#!/bin/sh
#
# Perform necessary gitlab setup steps
# after package is installed.
#
DEST_DIR=/opt/gitlab
notify()
{
echo "gitlab: $1"
@aursu
aursu / gitlab-postun.sh
Created June 7, 2018 11:47
GitLab postuninstall scriptlet (using /bin/sh):
#!/bin/sh
# WARNING: REQUIRES /bin/sh
#
# - must run on /bin/sh on solaris 9
# - must run on /bin/sh on AIX 6.x
# - if you think you are a bash wizard, you probably do not understand
# this programming language. do not touch.
# - if you are under 40, get peer review from your elders.
is_smartos() {
@aursu
aursu / run-curl.sh
Created June 11, 2018 03:00
Connect to Cisco AnyConnect VPN
#!/bin/bash
loginscript=vpn-login
[ -f $loginscript ] && . $loginscript
VPNCOOKIE=$(curl -s -k "https://${VPNGATEWAY}/+webvpn+/index.html" \
-H 'Cookie: webvpnlogin=1' \
--data 'group_list=DefaultWEBVPNGroup' \
--data "username=${VPNLOGIN}" \
@aursu
aursu / gitlab.rb
Created June 11, 2018 03:40
GitLab: disable included monitoring
logrotate['enable'] = false
alertmanager['enable'] = false
prometheus_monitoring['enable'] = false