unixorn/tumult.plugin.zsh

View on GitHub
bin/enable-ftp-server

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
#
# Start the FTP Server on macOS and configure it to restart every boot
#
# Copyright 2016, Joe Block <jpb@ApesSeekingKnowledge.net>

set -o pipefail

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