unixorn/tumult.plugin.zsh

View on GitHub
bin/disable-ftp-server

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
#
# Disable the FTP server on macOS
#
# Copyright 2016, Joe Block <jpb@ApesSeekingKnowledge.net>

set -o pipefail

if [[ "$(uname -s)" = 'Darwin' ]]; then
  exec sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
else
  echo 'This only works on macOS'
  exit 1
fi