-
-
Save yongqianme/805960bd454ee0715a5fc5e5781f948b to your computer and use it in GitHub Desktop.
Launch Daemon Start up with Bash Script with omniEdge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string> | |
</dict> | |
<key>Label</key> | |
<string>com.startup</string> | |
<key>Program</key> | |
<!-- Full Path to the Script File. --> | |
<string>~./startomniedge.sh</string> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>KeepAlive</key> | |
<false/> | |
<key>LaunchOnlyOnce</key> | |
<true/> | |
<key>StandardOutPath</key> | |
<string>/tmp/omniedge.stdout</string> | |
<key>StandardErrorPath</key> | |
<string>/tmp/omniedge.stderr</string> | |
<key>UserName</key> | |
<string>admin</string> | |
<key>GroupName</key> | |
<string>admin</string> | |
<key>InitGroups</key> | |
<true/> | |
</dict> | |
</plist> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -w flag permanently adds the plist to the Launch Daemon | |
sudo launchctl load -w /Library/LaunchDaemons/com.omniedge.plist | |
# -w flag permanently remove the plist to the Launch Daemon | |
sudo launchctl unload -w /Library/LaunchDaemons/com.omniedge.plist | |
You can stop the launchctl process by | |
sudo launchctl stop /Library/LaunchDaemons/com.omniedge.plist | |
You can start the launchctl process by | |
sudo launchctl start -w /Library/LaunchDaemons/com.omniedge.plist | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo pkill omniedge | |
omniedge login -s <SECURITY KEY> | |
sudo omniedge join -n <VIRUTAL_NETWORK> & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment