Skip to content

Instantly share code, notes, and snippets.

View bmangesh's full-sized avatar
🎯
Focusing

MB Bharsakle bmangesh

🎯
Focusing
  • India
View GitHub Profile
#!/bin/sh
set -e
if [ $# -lt 2 ]; then
echo 1>&2 "Usage: $0 jobname <fromNum> [<toNum>]"
exit 1
fi
JOBNAME=$1
START=$2
Package documentation
By default, the CentOS containers are built using yum's nodocs option, which helps reduce the size of the image. If you install a package and discover files missing, please comment out the line tsflags=nodocs in /etc/yum.conf and reinstall your package.
Systemd integration
Currently, systemd in CentOS 7 has been removed and replaced with a fakesystemd package for dependency resolution. This is due to systemd requiring the CAP_SYS_ADMIN capability, as well as being able to read the host's cgroups. If you wish to replace the fakesystemd package and use systemd normally, please follow the steps below.
Dockerfile for systemd base image
FROM centos:7
MAINTAINER "you" <your@email.here>
ENV container docker
RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs
win_path = "C:/Users/mangesh.b/SonarAnalysis"
linux_path = "/home/ec2-user/SonarAnalysis"
import os, platform, git, subprocess
from array import *
ostype=os.name
def create_dir():
if ostype == 'nt':
if not os.path.exists(win_path):
// Hello1.cs
public class Hello1
{
public static void Main()
{
System.Console.WriteLine("Hello, World!");
}
}
@bmangesh
bmangesh / Helloworld1.java
Last active August 29, 2015 14:26
Sonar Java
public class Helloworld1 {
public void printHelloWorld1() {
System.out.println("Hello World 1!");
System.out.println("Oracle Java!");
}
}
@bmangesh
bmangesh / client_on_server.sh
Last active March 27, 2020 12:47
Automated Installation Of Nagios Client on Linux Server
#! /bin/bash
#Author : MANGESHKUMAR B. BHARSAKLE
#Date : 26,27 JAN 2015
# Install NRPE Plugin on Server Side
cd /tmp/
wget http://garr.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz
tar -xzf nrpe-2.15.tar.gz
cd nrpe-2.15
@bmangesh
bmangesh / Nagios_Client.sh
Last active August 29, 2015 14:14
Automated Installation of NAGIOS_NRPE Plugins ON CLIENT SIDE
#! /bin/bash
#Author : MANGESHKUMAR B. BHARSAKLE
#Date : 26,27 JAN 2015
yum install -y gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel
useradd nagios
cd /tmp/
@bmangesh
bmangesh / Nagios_server1.sh
Created January 26, 2015 19:09
Automated Installation of NAGIOS ON SERVER SIDE
#! /bin/bash
#Author : MANGESHKUMAR B. BHARSAKLE
#Date : 26,27 JAN 2015
#Automated Installation of NAGIOS ON SERVER SIDE
cd /tmp/
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.1.tar.gz
wget https://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz
echo " "
echo "Adding users"
@bmangesh
bmangesh / ftp1
Last active August 29, 2015 14:08
Fetch latest timestamp file from ftp server e.g abcdDDMMYY.txt
#!/bin/bash
#Author: MANGESHKUMAR B BHARSAKLE
#PROBLEM:How to download latest timestamp file from FTP remote SERVER to local
if [ -f tempfile ]
then
rm -rf tempfile
fi
ftp -n 192.168.127.151 >tempfile <<EOF
user ftp ftp
@bmangesh
bmangesh / backup.sh
Created October 12, 2014 09:45
This Script is Used to Take Daily Backup of User Home Directory
#! /bin/bash
# Aim : This Script is mainly written to take a backup of User's Home Directory
# Author : MANGESHKUMAR B BHARSAKLE
# 1: userslist.txt root@192.168.0.24 /var/tmp/backup root@desktop24.example.com 7
if [ $# -ne 4 -a $# -ne 5 ]; then
echo "cla msg"
exit 9
fi