notakaos / osx-service-cmd

Linux like 'service' command for OSX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is this?

It provides linux like service command for OSX

Install

git clone https://github.com/nobutakaoshiro/osx-service-cmd.git
cd osx-service-cmd

# Install 'service' command to /usr/local/bin
./install.sh

# Add /usr/local/bin to $PATH if you needed
# ~/.bash_profile
export PATH=/usr/local/bin:$PATH

Usage

# command: [start|stop|restart|enable|disable]
service <plist_name> <command>

# show LaunchAgents/LaunchDaemons list
service list

Example

# if "~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist" exists
service mongodb start
service homebrew.mxcl.mongodb start
service homebrew.mxcl.mongodb.plist start

Uninstall

rm /usr/local/bin/service

LICENSE

MIT License

About

Linux like 'service' command for OSX

License:MIT License


Languages

Language:Shell 100.0%