This file contains 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 | |
SERVER_DESCRIPTION="Nis Test" | |
LOG_RESTART="/root/scripts/logs/restart.log" | |
clear | |
printf "\n\n\n" | |
printf "Please, choose server to restart.\n | |
Available servers : \n | |
[1] Tomcat\n[2] TomcatDM\n[3] PostgresSQL |
This file contains 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
Just to mention that I work on Intel i5 and Windows10-64bit. | |
I tried literally everything. After one of those system updates, my Netbeans 8.2 influenced a system to be very slow, almost to the point of unresponsiveness. During NB startup or build, system is practically unresponsive. | |
So, all possible tweaks both Netbeans and Java, couldn't solve a problem. | |
It seems that Windows update itself trigger off a problem to happen, as updates did changes on low system level, I suppose. | |
I decided to lower a Netbeans PID, by creating new shortcut like this : | |
cmd.exe /c start "Netbeans 8.2 LowPrio" /Low "C:\Program Files\NetBeans 8.2\bin\netbeans64.exe" | |
For now I can work without disruption, and it's far more smoother, than before. |
This file contains 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
########################################################### | |
# fast compression of the big postgresql backup file # | |
# we'll take advantage of the multi processor machine # | |
# to speedup compression process ! # | |
# # | |
# reqirement : apt-get install pigz (ubuntu/debian like) # | |
########################################################### | |
# input parameter1 = <entire folder to compress> | |
# input parameter2 = $CPU_NO |
This file contains 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
### We're installing dependencies (certutils commdand) | |
### based on the fantastic explanation covered here : https://coderwall.com/p/ez1x2w/send-mail-like-a-boss | |
apt-get install libnss3-tools | |
mkdir certs | |
### optional | |
chown -R root:tomcat certs/ | |
chmod 770 -R certs/ | |
certutil -N -d certs/ |
This file contains 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 | |
CLIENT="Server name" | |
DBNAME="postgres_database_Name" | |
POSTGRESAUTH="postgres" | |
PGPASSWORD="db password" | |
MODE=full | |
TO1="[email protected]" | |
TO2="[email protected]" | |
SUBJ="$CLIENT, baza: $DBNAME, full vacuum završen" |
This file contains 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 | |
BACKUP_DIR="/backup-nas/backup-db/" | |
PGHOST="localhost" | |
PGUSER="postgres" | |
PGPASSWORD="<enter password here>" | |
SERVER_IP_ADDRESS=10.100.129.212 | |
BACKUP_LOCATION=/HosDB/backup/on2hour | |
DATABASE_NAME=retailconnect |
This file contains 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 | |
CLIENT=" <description for the client who we make backup for> " | |
SRC_IP_ADD= <ip_address> | |
SRC_NAS_BACKUP="/backup-nas" | |
DST_PG_BACKUP="/tmp/postgres/backuprestore" | |
NAS_BACKUP_DB="backup-db" | |
### Operational directory, eg. if we have ssd drive, opinting to it, will | |
### significally make process faster ! |
This file contains 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-get update | |
sudo apt-get install build-essential libgd2-xpm-dev openssl libssl-dev xinetd apache2-utils unzip | |
sudo useradd nagios | |
sudo groupadd nagcmd | |
sudo usermod -a -G nagcmd nagios | |
apt-get update | |
apt-get install build-essential libgd2-xpm-dev openssl libssl-dev xinetd apache2-utils unzip | |
cd /tmp/ | |
tar xvf nagios-plugins-2.1.1.tar.gz |
This file contains 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
'version 29.1.2017 8:13 | |
'NOTICE : | |
'Nor files neither folder should contain "space" in their names | |
'since the script will ommit characters after the first space occurence in it's name | |
'in "%%~nF.7z" | |
'7zip execution folder | |
set comdir=C:\Program Files\7-Zip |