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 | |
# Installation | |
su | |
apt-get install software-properties-common dirmngr | |
apt-add-repository 'deb http://shaggytwodope.github.io/repo ./' | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7086E9CC7EC3233B | |
apt-get update | |
apt-get install drive |
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
tns create Countdown --vue | |
cd Countdown | |
node_modules\.bin\update-ns-webpack --configs | |
tns doctor |
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
server { | |
listen 80; | |
listen 443 ssl http2; | |
server_name blablabla.local www.blablabla.local; | |
root /var/www/html/blablabla.com/public; | |
add_header X-Frame-Options "SAMEORIGIN"; |
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 | |
EXIT_CODE=0 | |
for cartella in $( ls -l /var/www | grep -e "^d" | awk '{ print $9 }'); do | |
echo "Scansione /var/www/$cartella ...." | |
for phpfile in $(find /var/www/$cartella -type f -iname '*.php'); do |
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
# All steps on debian require root | |
# DO NOT TRY THIS ON DEBIAN 8 - It will not works ! | |
# Note the `-`. Is important ! | |
su - | |
cd /tmp | |
wget https://assets.nagios.com/downloads/ncpa/ncpa-latest.d9.amd64.deb | |
# NOTE: if you got this problem or similar : | |
# dpkg: warning: 'start-stop-daemon' not found in PATH or not executable | |
# you are not using `su -`. |
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
# this config file is an example of config file for handle | |
# remote host with nrpe insted of the new ncpa | |
# save this file on the controller, NOT on the controlled machine | |
define host { | |
host_name Server 212 | |
address 212.271.149.146 | |
check_command check-host-alive | |
max_check_attempts 5 |
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 | |
cd /var/www/credit-sales | |
git status --porcelain | grep php >> /dev/null | |
if [ $? -gt 0 ]; then | |
echo "CRITICAL, folder credit-sales modified" | |
exit 2 | |
fi |
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
# Use nrpe on remote host instead of ncpa only if ncpa is not working | |
# this setup require BOTH nrpe AND plugins | |
# Use this when on debian 7/8 | |
################ | |
# NRPE # | |
################ | |
# Execute all as super user ! |
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
#### See https://support.nagios.com/forum/viewtopic.php?f=7&t=53059 | |
# Save the content of the file into /usr/local/nagios/libexec/custom_check_mem | |
# - ownership root:nagios | |
# - permissions 755 | |
#!/bin/bash | |
# Script to check real memory usage | |
# L.Gill 02/05/06 - V.1.0 | |
# ------------------------------------------ | |
# ######## Script Modifications ########## |
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
server { | |
#### NOTE: UPDATE THE DOMAIN ACCORDING TO YOUR SETUP #### | |
server_name nagios.test; | |
#### NOTE: UPDATE THE PATH ACCORDING TO YOUR SETUP #### | |
#### This is my Debian 10 vps #### | |
#### Some systems uses /usr/share/nagios/share #### | |
root /usr/local/nagios/share; |