This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #nano sudo vi /etc/yum.repos.d/webmin.repo | |
| echo "[Webmin]" >> /etc/yum.repos.d/webmin.repo | |
| echo "name=Webmin Distribution Neutral" >> /etc/yum.repos.d/webmin.repo | |
| echo "#baseurl=http://download.webmin.com/download/yum" >> /etc/yum.repos.d/webmin.repo | |
| echo "mirrorlist=http://download.webmin.com/download/yum/mirrorlist" >> /etc/yum.repos.d/webmin.repo | |
| echo "enabled=1" >> /etc/yum.repos.d/webmin.repo | |
| echo "" >> /etc/yum.repos.d/webmin.repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| ## If sudo is not available on the system, | |
| ## uncomment the line below to install it | |
| # apt-get install -y sudo | |
| sudo apt-get update -y | |
| ## Install prerequisites | |
| sudo apt-get install curl gnupg -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo docker stop graylog | |
| sudo docker rm graylog | |
| sudo docker run --name graylog --link mongo --link elasticsearch -p 9100:9000 -p 12201:12201 -p 1514:1514 -e GRAYLOG_HTTP_EXTERNAL_URI="http://core.tripsaathi.com:9100/" -d graylog/graylog:4.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh -eux | |
| # Delete all Linux headers | |
| dpkg --list \ | |
| | awk '{ print $2 }' \ | |
| | grep 'linux-headers' \ | |
| | xargs apt-get -y purge; | |
| # Remove specific Linux kernels, such as linux-image-3.11.0-15-generic but | |
| # keeps the current kernel and does not touch the virtual packages, | |
| # e.g. 'linux-image-generic', etc. | |
| dpkg --list \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #copied from https://raw.githubusercontent.com/Snoop05/raspberrypi/master/expand-rootfs.sh | |
| VERSION="0.1" | |
| if (($EUID < 1)); then | |
| export ROOTDEV=$(mount | grep ' / '|cut -d' ' -f 1) | |
| export ROOTPART=$(lsblk -no NAME $ROOTDEV) | |
| export ROOTDISK=$(lsblk -no PKNAME $ROOTDEV) | |
| export ROOTPARTNUM=$(cat /sys/class/block/$ROOTPART/partition) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt update | |
| sudo apt install -y docker.io | |
| sudo systemctl enable docker --now | |
| sudo docker info | |
| sudo usermod -aG docker $USER | |
| newgrp docker | |
| # docker-ce - raspberry-64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Debug mode: change to 'yes' to enable | |
| DEBUG=no | |
| function log() { | |
| [ "${DEBUG}" = "yes" ] && echo $* | logger -t "$0[$$]" | |
| } | |
| function logpipe() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=ATS Backend APIs | |
| StartLimitIntervalSec=0 | |
| [Service] | |
| Environment=PORT=5555 | |
| Environment=LOG=true | |
| ExecStart=node dist/main | |
| WorkingDirectory=/var/local/ats-core | |
| User=root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void GetAuthorizationToken() | |
| { | |
| ClientCredential cc = new ClientCredential(AzureDetails.ClientID, AzureDetails.ClientSecret); | |
| var context = new AuthenticationContext("https://login.microsoftonline.com/" + AzureDetails.TenantID); | |
| var result = context.AcquireTokenAsync("https://management.azure.com/", cc); | |
| if (result == null) | |
| { | |
| throw new InvalidOperationException("Failed to obtain the Access token"); | |
| } | |
| AzureDetails.AccessToken = result.Result.AccessToken; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-add-repository ppa:certbot/certbot | |
| sudo apt install certbot | |
| wget https://github.com/joohoi/acme-dns-certbot-joohoi/raw/master/acme-dns-auth.py | |
| chmod +x acme-dns-auth.py | |
| nano acme-dns-auth.py | |
| # change #!/usr/bin/env python to #!/usr/bin/env python3 | |
| sudo mv acme-dns-auth.py /etc/letsencrypt/ |