ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Automatic Scripts? Anyone want to share some of their tools?

    Scheduled Pinned Locked Moved IT Discussion
    7 Posts 6 Posters 824 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      LAH3385
      last edited by

      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!!

      1 Reply Last reply Reply Quote 0
      • MattSpellerM
        MattSpeller
        last edited by MattSpeller

        If blood caffeine levels low, check Thermos for coffee;

        If Thermos = 0, destroy all humans; else continue daily tasks.

        DustinB3403D 1 Reply Last reply Reply Quote 1
        • DustinB3403D
          DustinB3403 @MattSpeller
          last edited by

          @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

          1 Reply Last reply Reply Quote 1
          • nadnerBN
            nadnerB
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • stacksofplatesS
              stacksofplates
              last edited by stacksofplates

              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

              dafyreD 1 Reply Last reply Reply Quote 1
              • dafyreD
                dafyre @stacksofplates
                last edited by

                @johnhooks Are you able to restore from those snapshot backups? I'd be curious to see that process, lol.

                stacksofplatesS 1 Reply Last reply Reply Quote 1
                • stacksofplatesS
                  stacksofplates @dafyre
                  last edited by

                  @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

                  1 Reply Last reply Reply Quote 2
                  • 1 / 1
                  • First post
                    Last post