How to launch verdaccio (forked version of sinopia) at boot on mac OS X?

278 Views Asked by At

I tried to create .plist at /Library/LaunchDaemons but it doesn't run.

It follows below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>org.verdaccio</string>
    <key>Program</key>
    <string>/usr/local/bin/verdaccio</string>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
  </dict>
</plist>

Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

The right answer to have it working is as below:

<?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>EnvironmentVariables</key>
    <dict>
      <key>PATH</key>
      <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
    </dict>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>org.verdaccio</string>
    <key>ProgramArguments</key>
    <array>
      <string>/usr/local/bin/verdaccio</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>UserName</key>
    <string>igor</string>
    <key>SessionCreate</key>
    <true/>
  </dict>
</plist>