remove keeplive key from plist, update shell script adding launchctl start/stop command
keeplive key makes the services of shadowsocks-ng automatically start when logining system Replace the original way with launchctl start/stop, then start the services when needed as shadowsocks-ng using
This commit is contained in:
@ -60,7 +60,6 @@ func generateSSLocalLauchAgentPlist() -> Bool {
|
|||||||
let dict: NSMutableDictionary = [
|
let dict: NSMutableDictionary = [
|
||||||
"Label": "com.qiuyuzhou.shadowsocksX-NG.local",
|
"Label": "com.qiuyuzhou.shadowsocksX-NG.local",
|
||||||
"WorkingDirectory": NSHomeDirectory() + APP_SUPPORT_DIR,
|
"WorkingDirectory": NSHomeDirectory() + APP_SUPPORT_DIR,
|
||||||
"KeepAlive": true,
|
|
||||||
"StandardOutPath": logFilePath,
|
"StandardOutPath": logFilePath,
|
||||||
"StandardErrorPath": logFilePath,
|
"StandardErrorPath": logFilePath,
|
||||||
"ProgramArguments": arguments,
|
"ProgramArguments": arguments,
|
||||||
@ -203,7 +202,6 @@ func generatePrivoxyLauchAgentPlist() -> Bool {
|
|||||||
let dict: NSMutableDictionary = [
|
let dict: NSMutableDictionary = [
|
||||||
"Label": "com.qiuyuzhou.shadowsocksX-NG.http",
|
"Label": "com.qiuyuzhou.shadowsocksX-NG.http",
|
||||||
"WorkingDirectory": NSHomeDirectory() + APP_SUPPORT_DIR,
|
"WorkingDirectory": NSHomeDirectory() + APP_SUPPORT_DIR,
|
||||||
"KeepAlive": true,
|
|
||||||
"StandardOutPath": logFilePath,
|
"StandardOutPath": logFilePath,
|
||||||
"StandardErrorPath": logFilePath,
|
"StandardErrorPath": logFilePath,
|
||||||
"ProgramArguments": arguments
|
"ProgramArguments": arguments
|
||||||
@ -358,7 +356,6 @@ func generateKcptunLauchAgentPlist() -> Bool {
|
|||||||
let dict: NSMutableDictionary = [
|
let dict: NSMutableDictionary = [
|
||||||
"Label": "com.qiuyuzhou.shadowsocksX-NG.kcptun",
|
"Label": "com.qiuyuzhou.shadowsocksX-NG.kcptun",
|
||||||
"WorkingDirectory": NSHomeDirectory() + APP_SUPPORT_DIR,
|
"WorkingDirectory": NSHomeDirectory() + APP_SUPPORT_DIR,
|
||||||
"KeepAlive": true,
|
|
||||||
"StandardOutPath": logFilePath,
|
"StandardOutPath": logFilePath,
|
||||||
"StandardErrorPath": logFilePath,
|
"StandardErrorPath": logFilePath,
|
||||||
"ProgramArguments": arguments,
|
"ProgramArguments": arguments,
|
||||||
|
@ -7,3 +7,4 @@
|
|||||||
# Copyright © 2017年 qiuyuzhou. All rights reserved.
|
# Copyright © 2017年 qiuyuzhou. All rights reserved.
|
||||||
|
|
||||||
launchctl load "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.kcptun.plist"
|
launchctl load "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.kcptun.plist"
|
||||||
|
launchctl start com.qiuyuzhou.shadowsocksX-NG.kcptun
|
||||||
|
@ -7,3 +7,4 @@
|
|||||||
# Copyright © 2016年 zhfish. All rights reserved.
|
# Copyright © 2016年 zhfish. All rights reserved.
|
||||||
|
|
||||||
launchctl load "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.http.plist"
|
launchctl load "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.http.plist"
|
||||||
|
launchctl start com.qiuyuzhou.shadowsocksX-NG.http
|
||||||
|
@ -6,4 +6,5 @@
|
|||||||
# Created by 邱宇舟 on 16/6/6.
|
# Created by 邱宇舟 on 16/6/6.
|
||||||
# Copyright © 2016年 qiuyuzhou. All rights reserved.
|
# Copyright © 2016年 qiuyuzhou. All rights reserved.
|
||||||
|
|
||||||
launchctl load "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.local.plist"
|
launchctl load "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.local.plist"
|
||||||
|
launchctl start com.qiuyuzhou.shadowsocksX-NG.local
|
||||||
|
@ -6,4 +6,5 @@
|
|||||||
# Created by 邱宇舟 on 2017/1/11.
|
# Created by 邱宇舟 on 2017/1/11.
|
||||||
# Copyright © 2017年 qiuyuzhou. All rights reserved.
|
# Copyright © 2017年 qiuyuzhou. All rights reserved.
|
||||||
|
|
||||||
|
launchctl stop com.qiuyuzhou.shadowsocksX-NG.kcptun
|
||||||
launchctl unload "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.kcptun.plist"
|
launchctl unload "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.kcptun.plist"
|
||||||
|
@ -6,6 +6,5 @@
|
|||||||
# Created by 王晨 on 16/10/7.
|
# Created by 王晨 on 16/10/7.
|
||||||
# Copyright © 2016年 zhfish. All rights reserved.
|
# Copyright © 2016年 zhfish. All rights reserved.
|
||||||
|
|
||||||
|
launchctl stop com.qiuyuzhou.shadowsocksX-NG.http
|
||||||
|
|
||||||
launchctl unload "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.http.plist"
|
launchctl unload "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.http.plist"
|
||||||
|
@ -6,6 +6,5 @@
|
|||||||
# Created by 邱宇舟 on 16/6/6.
|
# Created by 邱宇舟 on 16/6/6.
|
||||||
# Copyright © 2016年 qiuyuzhou. All rights reserved.
|
# Copyright © 2016年 qiuyuzhou. All rights reserved.
|
||||||
|
|
||||||
|
launchctl stop com.qiuyuzhou.shadowsocksX-NG.local
|
||||||
|
launchctl unload "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.local.plist"
|
||||||
launchctl unload "$HOME/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.local.plist"
|
|
||||||
|
Reference in New Issue
Block a user