• Mac OS X,  Mac OS X Server

    Replace the macOS Server DHCP Service with bootp

    View Your Old Settings The first step to moving services from macOS Server for pretty much all services is to check out the old settings. The second step is to probably ask if where you’re going to put the service is a good idea. For example, these days I prefer to run DHCP services on a network appliance. But it can absolutely be run on a Mac. And so let’s look at how to do that. Here, we’ll use the serveradmin command to view the settings of the DHCP service: /Applications/Server.app/Contents/ServerRoot/usr/sbin/serveradmin settings dhcp The output is an array of subnets with different settings per subnet. dhcp:static_maps = _empty_array dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:WINS_primary_server =…

  • Mac OS X,  Mac OS X Server,  Network Infrastructure

    Configure Access To File Shares On WD MyCloud

    The WD MyCloud is a pretty single-purpose device. It’s a disk with a network interface, and as with Direct Attached Storage, the MyCloud Network Attached Storage is pretty easy to connect to. First, let’s look at connecting to the web interface via the menu item, where you can drag and drop files to the device. Once the device is configured, use the WD menu item to see your device. From there, click on the name of your device. Alternatively, you could visit mycloud.com and sign into the web interface there. In both cases, you’ll see a list of files and then in the sidebar, you’ll see those options to configure settings,…

  • Mac OS X,  Mac OS X Server

    Install mySQL on macOS

    macOS might be the easiest platform to install MySQL on. To do so, simply download the MySQL installation package from the MySQL Download site. I like to use the third link (the DMG). Once downloaded, run the package. The package will ask you a few questions and you can easily just select the default choice during the installation process. Once installed, you’ll be prompted that a temporary password has been used for your MySQL instance. The password will get you in the first time, so you can change it. Once you have documented the password, open System Preferences and click on MySQL in the bottom row of System Preference Panes. Click Start MySQL…

  • Mac OS X,  Mac OS X Server,  Mac Security

    Replace the VPN Server from macOS Server

    Export macOS Server DataWe’re not going to import this, as it only takes a few seconds to configure new settings. Additionally, if you have outstanding services built on macOS Server, you might be able to pull this off without touching client systems. First, let’s grab  which protocols are enabled, running the following from Terminal: sudo serveradmin settings vpn:Servers:com.apple.ppp.pptp:enabled sudo serveradmin settings vpn:Servers:com.apple.ppp.l2tp:enabled Next, we’ll get the the IP ranges used so we can mimic those (or change them) in the new service: sudo serveradmin settings vpn:Servers:com.apple.ppp.pptp:IPv4:DestAddressRanges Now let’s grab the DNS servers handed out so those can be recreated: sudo serveradmin settings vpn:Servers:com.apple.ppp.pptp:DNS:OfferedServerAddresses:_array_indexsudo serveradmin settings vpn:Servers:com.apple.ppp.l2tp:DNS:OfferedServerAddresses:_array_index Finally, if you’re using…

  • Mac OS X,  Network Infrastructure

    Replace Time Machine Server on macOS Server with WD’s MyCloud.com

    The past couple of years has forced me to rethink many of my recommendations for how you backup computers in small office and home environments. Previously, I would have said that you could use a disk attached to an Apple AirPort. But the AirPort Base Station is no longer being made. Previously, I would have said you could use Time Machine Server, a service built into macOS Server in 5.4 and below. But that service is no longer being made in macOS Server by Apple and is now found in the Sharing System Preference pane . Previously, I might have even said to use the home edition of CrashPlan, which…

  • Mac OS X,  Mac OS X Server,  Mac Security,  WordPress

    Replace the Web Services in macOS Server with MAMP Pro

    In an earlier article, I mentioned that MAMP Pro was still the best native GUI for managing web services on the Mac, now that macOS Server will no longer serve up those patchy services. After we cover the management in this article, you’ll likely understand why it comes it at $59.  So you’ve installed MAMP. And you need more than the few basic buttons available there. So MAMP Pro came with it and you can try it for a couple of weeks for free. When you open MAMP Pro, you’ll see a screen where you can perform a number of management tasks. This is a more traditional side-bar-driven screen that…

  • Mac OS X,  Mac OS X Server

    Replace macOS Server Web Services with MAMP

    The most customizable way to replace web services for macOS with another solution is to custom-build your own Apache or nginx. You can even get a GUI for Apache on the Mac. If you want a one-button installation, the closest thing is likely to be IIS running on a Windows Server. But there are other alternatives that let you keep the Mac hardware and run sites on a Mac without the macOS Server GUI. In this article we’ll look at moving forward with a tool that’s been around long enough for me to mention it in about a dozen books: MAMP. Before writing this article, I tried out all of…

  • bash,  Mac OS X

    Bash: if, then, else, and expressions

    One of the most important skills in any language is to know how a basic if then statement works. You set a variable, you say if that variable matches a given pattern (or doesn’t) then do something or else do something different. If/then/else. Other than that, it’s just syntax, and the annoyance of figuring out the operators and syntax.  So let’s go through the below script (which checks a Mac to see if grayscale is enabled in Universal Access), line-by-line: Line 1: we’re first going to create a variable called grayscale. We’ll fill it with a 0 or 1, the output of a simple “defaults read com.apple.universalaccess grayscale” command If that grayscale…

  • Apple Configurator,  Apps,  iPhone,  Mac OS X

    Get The Title Of An App From Apple App Store URLs

    When you’re building and manipulating apps in the Apple App Stores, it helps to be able to pull and parse pieces of data. Here, we’ll look at two strategies that you can use to do so. It’s worth noting that the purpose of this was to use the URL of an app from an MDM and then be able to script updating metadata about the app, given that vendors often change names of the display name of an app (e.g. Yelp is actually called “Yelp: Discover Local Favorites on the App Store”). First, we’ll grab a URL. This one is for Self Service: https://itunes.apple.com/us/app/self-service-mobile/id718509958?mt=8 If you don’t know the URL…

  • Mac OS X

    Invoking Automator Workflows From The Command Line

    There’s a great website at https://macosxautomation.com that provides a lot of information on using Automator to build automations for the Mac. When you build automations, you can run them by double-clicking on apps or workflows. You can also invoke them with the automator command. The automator command can, surprisingly, be used to run automator workflows. I know, it’s crazy. Located at /usr/bin/automator the automator command can be used to fire up workflows. In its most basic incantation, you can invoke a workflow without much fuss. Here, I’ll use a workflow that just fires up a specific screensaver: /usr/bin/automator ~/Desktop/screensaver.workflow In addition, you can run workflows in verbose mode for simple…