1

I created a LaunchDaemon to automatically start a mining client when the computer boots. Here is the .plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.example.miner</string>
    <key>ProgramArguments</key>
    <array>
        <string>/bin/sh</string>
        <string>/library/start.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/tmp/com.example.minerout</string>
</dict>
</plist>

The goal of this LaunchDaemon is to start and keep a cryptocurrency miner running when the computer boots. The miner start script is inside the Library folder, and the miner is in the same folder.

Why is the LaunchDaemon loading, but not starting?

  • Besides the probably non-existent path /library/start.sh (case sensitive!) a proper location for the *.sh script as well as the mining binary is /usr/local/bin/ or ~/bin/ or a some subfolder there & symlink to /usr/local/bin/ or ~/bin/! – klanomath Dec 9 '17 at 4:21
1

Well I figured out the issue after 30 minutes of adjusting the LaunchDaemon. The issue was in the start.sh file. I had forgotten to correctly set the location of the miner.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .