0

So I have a very brief .sh script in OSX designed to start the system mining at boot (not login!).

#! /bin/sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
CMD=$DIR"m-minerd -o url -u user:worker -p pass"
$CMD

I know this works from executing it as a trial, but I can't figure out how, on an OSX machine (I have root access) to get it to run at system boot. I know launchd is a thing, but it's a GUI (as far as I can tell) and I need the method to be executable on the command line via another shell script that will install dependencies, move everything into place, and place this .sh into the folder it needs to be in in order to launch on boot. Help is appreciated, thank you!

velvetxcat
  • 13
  • 5
  • 1
    Check out https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html and `man launchd.plist` – jtbandes May 18 '16 at 02:18
  • If this is your actual code, you first need to fix your shebang. –  May 18 '16 at 02:18
  • Not actual code it's just so y'all get the gist. Thanks jtbandes! – velvetxcat May 18 '16 at 02:57

0 Answers0