update mac install cmd

This commit is contained in:
nikk gitanes
2023-12-23 14:47:33 +03:00
parent 553e4894c8
commit 72ca7c76cf
2 changed files with 3 additions and 1 deletions

View File

@@ -65,7 +65,7 @@ curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrSe
Run in Terminal.app
```bash
curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrServerMac.sh -o installTorrserverMac.sh && chmod 755 installTorrServerMac.sh && sudo bash ./installTorrServerMac.sh
curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrServerMac.sh -o installTorrserverMac.sh && chmod 755 installTorrServerMac.sh && bash ./installTorrServerMac.sh
```
Alternative install script for Intel Macs: <https://github.com/dancheskus/TorrServerMacInstaller>

View File

@@ -79,6 +79,7 @@ function installTorrServer() {
echo " Устанавливаем TorrServer $(getLatestRelease)"
echo ""
}
user=$(whoami)
binName="TorrServer-darwin-${architecture}"
[[ ! -d "$dirInstall" ]] && mkdir -p ${dirInstall} && chmod a+rw ${dirInstall}
urlBin="https://github.com/YouROK/TorrServer/releases/download/$(getLatestRelease)/${binName}"
@@ -178,6 +179,7 @@ EOF
sysPath="${HOME}/Library/LaunchAgents"
[[ ! -d "$sysPath" ]] && mkdir -p ${sysPath}
cp "$dirInstall/$serviceName.plist" $sysPath
sudo chown $user "$sysPath/$serviceName.plist"
chmod 0644 "$sysPath/$serviceName.plist"
launchctl load -w "$sysPath/$serviceName.plist" 1>/dev/null 2>&1
else