Automatic Scripts? Anyone want to share some of their tools?
-
So I read a post about a guy who utilize scripts to do his work for him. I want to know how can this benefit IT environment? If it's something repetitive, I understand but is there a script that will allow, for example, a computer change its IP address as per user who logged in at the time?
I am a lone wolf here at my company and want to utilize any scripts that will help it easier to monitor or just do the job for me. I know this is not apple-to-apple situation but I like to have some ground to start with.
Thanks!!
-
If blood caffeine levels low, check Thermos for coffee;
If Thermos = 0, destroy all humans; else continue daily tasks.
-
@MattSpeller said:
If blood caffeine levels low, check Thermos for coffee;
If Thermos = 0, destroy all humans; else continue daily tasks.
I think the scientific way of checking this is either through a blood test (annoying / painful) or taking your blood pressure.
If it drops below X destory all humans
-
I don't have much automated as I'm not sure what I want/need automated but I do have a WSUS Auto-Decline script that is scheduled to run every Wednesday morning and sends an email gloating of its success.
https://community.spiceworks.com/scripts/show/2795-decline-wsus-updates
-
I have a small one that takes LVM snapshots of each VM and then exports it to a gzip file. It also deletes all backup files older than 4 days. I only included one server for the example.
#!/bin/bash /bin/find /mnt/backups/ -type f -name "*.backup" -mtime +4 -exec rm {} \; today=$(date +"%m-%d-%Y") #######Server Name####### /usr/sbin/lvcreate -L5G -s -n <snapname> /dev/vms/<LVM Name> dd if=/dev/vms/<snapname> | gzip > /mnt/backups/<short name>.$today.gz.backup yes | /usr/sbin/lvremove /dev/vms/<snapname>
It runs every morning at 12:05
-
@johnhooks Are you able to restore from those snapshot backups? I'd be curious to see that process, lol.
-
@dafyre said:
@johnhooks Are you able to restore from those snapshot backups? I'd be curious to see that process, lol.
Ya, just gunzip the file and then dd if=file of=new LVM