mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 10:37:33 -07:00
Mac launchd item and launcher script, uninstaller work.
This commit is contained in:
parent
8cc9692cd9
commit
50ef47cf0a
4 changed files with 55 additions and 5 deletions
24
ext/installfiles/mac/launch.sh
Executable file
24
ext/installfiles/mac/launch.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
zthome="/Library/Application Support/ZeroTier/One"
|
||||
ztapp="/Applications/ZeroTier One.app"
|
||||
|
||||
export PATH="/bin:/usr/bin:/sbin:/usr/sbin:$zthome"
|
||||
|
||||
# Uninstall if the .app has been thrown away
|
||||
if [ ! -d "$ztapp" ]; then
|
||||
if [ -e "$zthome/uninstall.sh" ]; then
|
||||
exec "$zthome/uninstall.sh"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create the app deletion notification symlink if it does
|
||||
# not already exist.
|
||||
if [ ! -L "$zthome/shutdownIfUnreadable" ]; then
|
||||
rm -f "$zthome/shutdownIfUnreadable"
|
||||
ln -sf "$ztapp/Contents/Info.plist" "$zthome/shutdownIfUnreadable"
|
||||
fi
|
||||
|
||||
# Launch ZeroTier One (not as daemon... launchd monitors it)
|
||||
exec zerotier-one
|
Loading…
Add table
Add a link
Reference in a new issue