A scheduled task that is setup to refresh the IP's for LazyMan with the latest IP's if found.
- Plex LazyMan Bundle
- Pre-Install Operations
- Installing the Scripts - Linux
- Installing the Scripts - Windows
- Testing the Scheduled Task - Windows
Make sure you have the following Plex.bundle installed on your Plex server nomego/Lazyman.bundle
Mare sure that the following lines are included in your machines hosts file. Also, make sure to replace (LATEST IP FOR powersports.ml) with the actual IP at the time of editing the hosts file.
### LazyMan Plex-Plugin
#powersports.ml-(LATEST IP FOR powersports.ml)
(LATEST IP FOR powersports.ml) mf.svc.nhl.com
(LATEST IP FOR powersports.ml) mlb-ws-mf.media.mlb.com
(LATEST IP FOR powersports.ml) playback.svcs.mlb.com
- Clone the repository under the /opt/ folder
- Edit the crontab to add/create the scheduled task (crontab Guide) pointing to the cloned script
sudo crontab -e
Example (runs at 11pm (23) every day)
0 23 * * * /opt/LazyMan_IP_Auto_Updater/LazyMan_IP_Auto_Updater.sh
- The Scheduled Task needs Higher Provileges in-order to update the Hosts file
- Clone the repository under the ~ current users folder
- Create a Scheduled task with Task Scheduler using the following properties
- General Tab
- Set the Name field to LazyMan Plex Plug-In Auto Updater or desired task name
- Choose the Run whether user is logged on or not option (will require users password upon saving task)
- Check the Run with highest Privileges option
- With the Configure For dropdown, select your target system
- Trigger Tab
- Add a new trigger each time you want the script to be triggered (example, run daily to update with the latest IP's if found)
- Action Tab
- Add a new action
- Set the new Action to Start a program
- Set the Program/script field to powershell
- Set the Add arguments field to the path of the PowerShell Script (C:\Users\(USER)\LazyMan_IP_Auto_Updater\LazyMan_IP_Auto_Updater.ps1)
- Conditions Tab
- (Optional) Can uncheck the Start the task only is the computer is on AC Power as this task isn't very intensive/time consuming and can be performed when on battery power
- (Optional) Could set the Start only if the following network connection is available as this script does require internet
- Save the Scheduled task - at this point you will have to enter your password allowing it to run the script as an administrator
- Make a copy of the host file (C:\Windows\System32\drivers\etc\hosts) just incase anything happens, the old version is kept
- Modify the IP that you entered in for (LATEST IP FOR powersports.ml) with a wrong IP address
- While in Task Scheduler, right-click on the task that you just created and click Run
- Open up the Hosts file to make sure that the IP for the LazyMan entries were corrected!