Posts tagged script

centos-logo-200

Howto use Kickstart with a PXE boot server and local yum repository

0

Sorry, this entry is only available in Français.

fs_logo_512_bigger

Configure FreeSwitch to receive Fax

0

Receiving fax in FreeSwitch is quite simple with mod_spandsp, but managing these faxes can be complex.

To help you, i decided to put here all the informations i have about my FreeSwitch configuration to receive faxes. Once you’ll be done with this tutorial, you sould have a nice system which will receive faxes and manage them easily.

(more…)

1.0

PHP/SNMP and MAC addresses

0

That scripts allow you to enter all MAC adresses informations into a database and then run whatever you like to that DB to make it throw up what you need.

(more…)

fs_logo_512_bigger

Modify the effective_caller_id_name in a dialplan from a CSV file

0

The problem that leads to that little article, is that our Freeswitch server is receiving traffic from a Nortel T1 on which it’s impossible to pass the Caller Name associated with a Caller ID, but we already had that link in our database, and exported to a csv file for management, so i decided to write a script that will parse that CSV file and return the associated Caller Name.
(more…)

1.0

Éteindre tous les ordinateurs d’un réseau

0

Question de sauver de l’électricité, il est une bonne idée d’implanter un script semblable pour éteindre tous les postes de votre réseau le soir quand tout le monde à quitté le bureau. Voici donc un petit script Bash qui roule sous n’importe quel serveur Linux.

#!/bin/bash
 
EXEMPTION_ARRAY=( 192.168.102.122 192.168.102.197 192.168.102.156 192.168.102.47 )
 
echo "THIS PROGRAM WILL SHUTDOWN ALL THE PCs IN THE NETWORK, PRESS CTRL+C TO EXIT, YOUVE 10 SECONDS"
 
sleep 10
 
echo "ARE YOU SURE YOU WANT THIS SCRIPT TO SHUTDOWN ALL THE PCs! YOUVE 5 SECONDES BEFORE BOMB PRESS CTRL+C TO STOP ME"
 
sleep 5
 
for IP in $(nmap -sP 192.168.101-103.* | grep ") appears to be up." | awk '{print $3}'); do
 
EXEMPT=false
 
IP2=${IP%%)}
IP3=${IP2##*(}
 
for check_exempt in ${EXEMPTION_ARRAY[@]}; do
	if [ "$check_exempt" = "$IP3" ]; then
		EXEMPT=true
	fi
done
 
if [ "$EXEMPT" = "true" ]; then
	echo $IP3 est exempte
else 
	/usr/bin/net rpc SHUTDOWN -f -I $IP3 -U 'username%password' -t 120
fi
 
done

Le script demande l’utilisation de nMap pour scanner le réseau pour les ordinateurs encore allumés.

Go to Top