ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. EddieJennings
    3. Posts
    • Profile
    • Following 8
    • Followers 2
    • Topics 175
    • Posts 5,449
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: What Are You Doing Right Now

      @gjacobse said in What Are You Doing Right Now:

      @eddiejennings said in What Are You Doing Right Now:

      Fixing an inherited PowerShell script.

      9afdb1d8-2ef5-4830-b9ad-9de117ad01b2-image.png

      Ha! I've seen worse scripts than this; however, all of its boolean tests are ($anActualBooleanValue -eq "True"), which apparently does work, but I wouldn't trust it.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Fixing an inherited PowerShell script.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Video editing then home lab time.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Video editing

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Working on some audio editing before teaching a saxophone lesson.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      @dashrender said in What Are You Doing Right Now:

      @eddiejennings said in What Are You Doing Right Now:

      Dealing with the frustration of having VMs in vCenter named for general VM function rather than the VM hostname.

      really? why would you want a VM name tied to it's host? Should we assume you'll never move a VM to another host?

      Let's say there's a VM with the hostname ATLSMTPV01, and the name of the VM in vCenter is Atlanta_Mail_Server_VM_01. If I get an alert that ATLSMTPV01 is down, and I can't access it via normal remote access tools, I want to be able to search for ATLSMTPV01 in vCenter to find the VM for console access rather than need to know to look for Atlanta_Mail_Server_VM_01.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Dealing with the frustration of having VMs in vCenter named for general VM function rather than the VM hostname.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      @gjacobse said in What Are You Doing Right Now:

      I almost wished I had not run that query now - as now I just want to ....

      Connected to and ran a query against AD and it looks like,... (dramatic pause while rechecking)

      Total Accounts:       1048
      Active Accounts:       476
      Disabled Accounts:     525
      

      God help me. True that this includes service accounts and some other 'fluff'... but,... god - help - me.

      Are there "inactive" but not disabled accounts since 476 + 525 = 1001?

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Searching through SOP documents to see if there's something that's younger than a decade old that relates to my question before playing a game of Email-Quest.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Testing Microsoft Configuration Manager current branch deployment procedures.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Rendering video.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Doing some audio and video editing.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      @dustinb3403
      I’d rather play the druid that summons the furries.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      @dustinb3403 said in What Are You Doing Right Now:

      @dashrender said in What Are You Doing Right Now:

      @dustinb3403 said in What Are You Doing Right Now:

      @dashrender said in What Are You Doing Right Now:

      @eddiejennings said in What Are You Doing Right Now:

      Doing what folks do best at DragonCon. Waiting in line πŸ˜›

      Donating blood!

      What the heck is DragonCon? There better not be any Wyverns here....

      It’s a costuming convention.

      Like a Furry Party? Or LARPing?

      Edited typo

      One day I’ll find time for LARP. πŸ™‚

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: Unifi Controller Installer Script for Ubuntu 21.04

      @dbeato I have not. Looks good.

      posted in IT Discussion
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Doing what folks do best at DragonCon. Waiting in line πŸ˜›

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • Unifi Controller Installer Script for Ubuntu 21.04

      I found a blog post a while back which helped me overcome the problem of installing the Unifi Controller with the current MongoDB. I made a script a little while back that documented the process and tried to automate much of it. I've since updated the script some, and I figure I'd share it.

      Note: this script only installs the software. It does not enable the service or do any firewall configuration.

      https://gitlab.com/EddieJennings/ubiquiti/-/blob/master/install_unifi_controller_ubuntu.sh

      For anyone new to scripting with BASH, here's the break-down of what it does and why I made certain decisions about how to handle things. Note that I've omitted most of the echo statements, which tell the user what's going on as it happens.

      MONGO_DL="https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/5.0/multiverse/binary-amd64/mongodb-org-server_5.0.2_amd64.deb"
      UNIFI_DL="https://dl.ui.com/unifi/6.2.26/unifi_sysvinit_all.deb"
      MONGO_FILE="/tmp/$(echo $MONGO_DL | rev | cut -d '/' -f 1 | rev)"
      UNIFI_FILE="/tmp/$(echo $UNIFI_DL | rev | cut -d '/' -f 1 | rev)"
      INSTALLER_LOG_FILE="/tmp/unifi_installer_$(date +%F).log"
      WAITING_MESSAGE="This may take a moment."
      

      I set a few variables here. The main two that you would want to periodically update are MONGO_DL and UNIFI_DL as you'll want to have the most current installer. Also these variables are used to create some file paths used for the installation. You'll notice I'm doing everything in /tmp. This allows for easy cleanup, as if the system is rebooted, the files will be deleted (and temporary stuff should live in /tmp).

      if [ "$(whoami)" != "root" ]; then
      	echo "You must run this script using sudo or"
      	echo "be logged in as root.  Exiting."
      	exit 1
      fi
      

      Since we're installing things, this needs to be run as root (either being logged in as root or using sudo). I decided to check to see if the account running the script was not root, and if true, then exit the script.

      apt install -y wget openjdk-8-jre-headless jsvc binutils > $INSTALLER_LOG_FILE 2>&1
      

      Next we install the dependencies for both this script and the Unifi controller. I use 2>&1 so that both standard output and standard error gets redirected to the log file.

      if [ -f "$MONGO_FILE" ]
      	then
      		echo "$MONGO_FILE was found. Continuing."
      		echo ""
      	else
      		echo "$MONGO_FILE was not found.  Downloading now."
      		echo "Downloading Mongodb Community installer. $(echo $WAITING_MESSAGE)"
      		echo ""
      		wget -O $MONGO_FILE  $MONGO_DL 2>> $INSTALLER_LOG_FILE
      		
      fi
      

      This block checks to see if the MongoDB installer file exists in /tmp and if not, wget downloads the file to the /tmp directory. I wanted to redirect the output of wget's downloading of the file, and since that output is actually standard error rather than standard output 2>>is necessary to redirect and append to the log file.

      if [ -f "$UNIFI_FILE" ]
      	then
      		echo "$UNIFI_FILE was found. Continuing."
      		echo ""
      	else
      		echo "$UNIFI_FILE was not found.  Downloading now."
      		echo "Downloading the Unifi Controller installer. $(echo $WAITING_MESSAGE)"
      		echo ""
      		wget -O $UNIFI_FILE $UNIFI_DL 2>> $INSTALLER_LOG_FILE
      		
      fi
      

      And I repeat this process for the Unifi Controller installer.

      dpkg -i $MONGO_FILE >> $INSTALLER_LOG_FILE 2>&1
      

      Finally, we start installing stuff beginning with MongoDB.

      dpkg --ignore-depends=mongodb-org-server -i $UNIFI_FILE >> $INSTALLER_LOG_FILE 2>&1
      

      Next we install the Unifi Controller. I specifically tell dkpg to ignore the mongodb-org-server dependency, since if MongoDB greater than version 4 is installed, the Unifi Controller install will fail. Such a requirement is probably by design; however, for my lab, I wanted to see if I can use the most current MongoDB. I have not had any problems with the current MongoDB; however, that's something to think about whether or not you want to do for production.

      dkpg output and any errors it throws are then logged.

      echo "################" | tee -a $INSTALLER_LOG_FILE
      echo "# **Reminder** #" | tee -a $INSTALLER_LOG_FILE
      echo "################" | tee -a $INSTALLER_LOG_FILE
      echo "" | tee -a $INSTALLER_LOG_FILE
      echo "##############################################################" | tee -a $INSTALLER_LOG_FILE
      echo "# Edit the /var/lib/dpkg/status file, and remove the         #" | tee -a $INSTALLER_LOG_FILE
      echo "# 'mongodb-org-server (<< 4.0.0)' requirement in the depends #" | tee -a $INSTALLER_LOG_FILE
      echo "# section as shown below.                                    #" | tee -a $INSTALLER_LOG_FILE
      echo "##############################################################" | tee -a $INSTALLER_LOG_FILE
      echo ""  | tee -a $INSTALLER_LOG_FILE
      grep -A 10 -i "Package: unifi" /var/lib/dpkg/status | grep --color=always -B 10 -i "mongodb-org-server (<< 4.0.0)"  | tee -a $INSTALLER_LOG_FILE
      echo ""
      

      The last section of the script is a suggestion to the user, and I wanted both the output to display to the user as well as be logged; thus, I piped the echo statements to the tee command.

      This final step probably isn't necessary, but since we're explicitly ignoring the MongoDB dependency, I figure it would be a good idea to remove it from /var/lib/dpkg/status file. Also, the above blog post follows that step. To date, I haven't figured out a reliable way to automate this piece. One day, I might come up with it.

      Hopefully this script will be useful to someone. πŸ™‚

      posted in IT Discussion bash unifi controller ubuntu 21.04 mongodb scripting
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      @hobbit666 said in What Are You Doing Right Now:

      @eddiejennings said in What Are You Doing Right Now:

      Reading about Zabbix

      What you reading about it?
      I always think it's a bigger product than what I'm using it for but never not around to checking 😁😁😁

      Requirements and how to deploy it. That’s the next thing I want to stand up in my little lab.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Debugging undesired script behavior.

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • RE: What Are You Doing Right Now

      Reading about Zabbix

      posted in Water Closet
      EddieJenningsE
      EddieJennings
    • 1
    • 2
    • 12
    • 13
    • 14
    • 15
    • 16
    • 272
    • 273
    • 14 / 273