sudo vim /Users/bhr/Library/LaunchAgents/com.mmac.useragent.plist

<?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>KeepAlive</key>
        <true/>
        <key>Label</key>
        <string>com.mmac.useragent</string>
        <key>Program</key>
        <string>/Users/bhr/startUp/bindfs.sh</string>
        <key>RunAtLoad</key>
        <true/>
        <key>StandardErrorPath</key>
        <string>/tmp/com.mmac.startup.stderr</string>
        <key>StandardOutPath</key>
        <string>/tmp/com.mmac.startup.stdout</string>
</dict>
</plist>

sudo vim /Users/bhr/startUp/bindfs.sh

#!/bin/bash
sudo /usr/local/bin/bindfs -r -g SFTPGroup /Volumes/DATACUBE/Media/Movies/ /chroot/sftp/movies
sudo /usr/local/bin/bindfs -r -g SFTPGroup /Volumes/DATACUBE/Media/Music/ /chroot/sftp/music
sudo /usr/local/bin/bindfs -r -g SFTPGroup /Volumes/DATACUBE/Media/TV\ Shows/ /chroot/sftp/tv

 

https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html#//apple_ref/doc/uid/10000172i-SW1-SW1

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *