Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0e5da7e2
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0e5da7e2
编写于
10月 18, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
10月 18, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17419 from taosdata/fix/ZhiqiangWang/TD-19466-add-taosadapter-to-macos-service
fix: add taosadapter to macos service
上级
3ff1ae2b
c370ca45
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
67 addition
and
21 deletion
+67
-21
packaging/tools/com.taosdata.taosadapter.plist
packaging/tools/com.taosdata.taosadapter.plist
+33
-0
packaging/tools/install.sh
packaging/tools/install.sh
+4
-4
packaging/tools/install_client.sh
packaging/tools/install_client.sh
+1
-1
packaging/tools/mac_before_install.txt
packaging/tools/mac_before_install.txt
+1
-0
packaging/tools/make_install.sh
packaging/tools/make_install.sh
+13
-8
packaging/tools/post.sh
packaging/tools/post.sh
+7
-2
packaging/tools/preun.sh
packaging/tools/preun.sh
+2
-2
packaging/tools/remove.sh
packaging/tools/remove.sh
+5
-3
packaging/tools/remove_client.sh
packaging/tools/remove_client.sh
+1
-1
未找到文件。
packaging/tools/com.taosdata.taosadapter.plist
0 → 100644
浏览文件 @
0e5da7e2
<?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>
Label
</key>
<string>
com.tdengine.taosadapter
</string>
<key>
ProgramArguments
</key>
<array>
<string>
/usr/local/bin/taosadapter
</string>
</array>
<key>
ProcessType
</key>
<string>
Interactive
</string>
<key>
Disabled
</key>
<false/>
<key>
RunAtLoad
</key>
<false/>
<key>
LaunchOnlyOnce
</key>
<false/>
<key>
SessionCreate
</key>
<true/>
<key>
ExitTimeOut
</key>
<integer>
600
</integer>
<key>
KeepAlive
</key>
<dict>
<key>
SuccessfulExit
</key>
<false/>
<key>
AfterInitialDemand
</key>
<true/>
</dict>
<key>
Program
</key>
<string>
/usr/local/bin/taosadapter
</string>
</dict>
</plist>
\ No newline at end of file
packaging/tools/install.sh
浏览文件 @
0e5da7e2
...
...
@@ -69,7 +69,7 @@ prompt_force=0
initd_mod
=
0
service_mod
=
2
if
p
idof
systemd &>/dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
systemd &>/dev/null
;
then
service_mod
=
0
elif
$(
which service &>/dev/null
)
;
then
service_mod
=
1
...
...
@@ -575,11 +575,11 @@ function install_web() {
function
clean_service_on_sysvinit
()
{
if
p
idof
${
serverName
}
&>/dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
${
serverName
}
&>/dev/null
;
then
${
csudo
}
service
${
serverName
}
stop
||
:
fi
if
p
idof
tarbitrator &>/dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
tarbitrator &>/dev/null
;
then
${
csudo
}
service tarbitratord stop
||
:
fi
...
...
@@ -759,7 +759,7 @@ function updateProduct() {
echo
-e
"
${
GREEN
}
Start to update
${
productName
}
...
${
NC
}
"
# Stop the service if running
if
p
idof
${
serverName
}
&>/dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
${
serverName
}
&>/dev/null
;
then
if
((
${
service_mod
}
==
0
))
;
then
${
csudo
}
systemctl stop
${
serverName
}
||
:
elif
((
${
service_mod
}
==
1
))
;
then
...
...
packaging/tools/install_client.sh
浏览文件 @
0e5da7e2
...
...
@@ -265,7 +265,7 @@ function update_TDengine() {
tar
-zxf
${
tarName
}
echo
-e
"
${
GREEN
}
Start to update
${
productName
}
client...
${
NC
}
"
# Stop the client shell if running
if
p
idof
${
clientName
}
&> /dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
${
clientName
}
&> /dev/null
;
then
kill_client
sleep
1
fi
...
...
packaging/tools/mac_before_install.txt
浏览文件 @
0e5da7e2
...
...
@@ -2,4 +2,5 @@ TDengine is a high-efficient, scalable, high-available distributed time-series d
To configure TDengine : edit /etc/taos/taos.cfg
To start service : launchctl start com.tdengine.taosd
To start Taos Adapter : launchctl start com.tdengine.taosadapter
To access TDengine : use taos in shell
\ No newline at end of file
packaging/tools/make_install.sh
浏览文件 @
0e5da7e2
...
...
@@ -77,7 +77,7 @@ os_type=0
if
[
"
$osType
"
!=
"Darwin"
]
;
then
initd_mod
=
0
if
p
idof
systemd &>/dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
systemd &>/dev/null
;
then
service_mod
=
0
elif
$(
which service &>/dev/null
)
;
then
service_mod
=
1
...
...
@@ -130,7 +130,6 @@ function kill_taosadapter() {
}
function
kill_taosd
()
{
ps
-ef
|
grep
${
serverName
}
pid
=
$(
ps
-ef
|
grep
-w
${
serverName
}
|
grep
-v
"grep"
|
awk
'{print $2}'
)
if
[
-n
"
$pid
"
]
;
then
${
csudo
}
kill
-9
$pid
||
:
...
...
@@ -438,7 +437,7 @@ function install_web() {
}
function
clean_service_on_sysvinit
()
{
if
p
idof
${
serverName
}
&>/dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
${
serverName
}
&>/dev/null
;
then
${
csudo
}
service
${
serverName
}
stop
||
:
fi
...
...
@@ -535,6 +534,10 @@ function install_service_on_launchctl() {
${
csudouser
}
launchctl unload
-w
/Library/LaunchDaemons/com.taosdata.taosd.plist
>
/dev/null 2>&1
||
:
${
csudo
}
cp
${
script_dir
}
/com.taosdata.taosd.plist /Library/LaunchDaemons/com.taosdata.taosd.plist
${
csudouser
}
launchctl load
-w
/Library/LaunchDaemons/com.taosdata.taosd.plist
>
/dev/null 2>&1
||
:
${
csudouser
}
launchctl unload
-w
/Library/LaunchDaemons/com.taosdata.taosadapter.plist
>
/dev/null 2>&1
||
:
${
csudo
}
cp
${
script_dir
}
/com.taosdata.taosadapter.plist /Library/LaunchDaemons/com.taosdata.taosadapter.plist
${
csudouser
}
launchctl load
-w
/Library/LaunchDaemons/com.taosdata.taosadapter.plist
>
/dev/null 2>&1
||
:
}
function
install_service
()
{
...
...
@@ -568,7 +571,7 @@ function update_TDengine() {
echo
-e
"
${
GREEN
}
Start to update
${
productName
}
...
${
NC
}
"
# Stop the service if running
if
p
idof
${
serverName
}
&>/dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
${
serverName
}
&>/dev/null
;
then
if
((
${
service_mod
}
==
0
))
;
then
${
csudo
}
systemctl stop
${
serverName
}
||
:
elif
((
${
service_mod
}
==
1
))
;
then
...
...
@@ -615,11 +618,12 @@ function update_TDengine() {
else
if
[
"
$osType
"
!=
"Darwin"
]
;
then
echo
-e
"
${
GREEN_DARK
}
To start
${
productName
}
${
NC
}
:
${
serverName
}${
NC
}
"
[
-f
${
installDir
}
/bin/taosadapter
]
&&
\
echo
-e
"
${
GREEN_DARK
}
To start Taos Adapter
${
NC
}
: taosadapter &
${
NC
}
"
else
echo
-e
"
${
GREEN_DARK
}
To start service
${
NC
}
: launchctl start com.tdengine.taosd
${
NC
}
"
echo
-e
"
${
GREEN_DARK
}
To start Taos Adapter
${
NC
}
: launchctl start com.tdengine.taosadapter
${
NC
}
"
fi
[
-f
${
installDir
}
/bin/taosadapter
]
&&
\
echo
-e
"
${
GREEN_DARK
}
To start Taos Adapter
${
NC
}
: taosadapter &
${
NC
}
"
fi
echo
-e
"
${
GREEN_DARK
}
To access
${
productName
}
${
NC
}
: use
${
GREEN_UNDERLINE
}${
clientName
}${
NC
}
in shell
${
NC
}
"
...
...
@@ -666,11 +670,12 @@ function install_TDengine() {
else
if
[
"
$osType
"
!=
"Darwin"
]
;
then
echo
-e
"
${
GREEN_DARK
}
To start
${
productName
}
${
NC
}
:
${
serverName
}${
NC
}
"
[
-f
${
installDir
}
/bin/taosadapter
]
&&
\
echo
-e
"
${
GREEN_DARK
}
To start Taos Adapter
${
NC
}
: taosadapter &
${
NC
}
"
else
echo
-e
"
${
GREEN_DARK
}
To start service
${
NC
}
: launchctl start com.tdengine.taosd
${
NC
}
"
echo
-e
"
${
GREEN_DARK
}
To start Taos Adapter
${
NC
}
: launchctl start com.tdengine.taosadapter
${
NC
}
"
fi
[
-f
${
installDir
}
/bin/taosadapter
]
&&
\
echo
-e
"
${
GREEN_DARK
}
To start Taos Adapter
${
NC
}
: taosadapter &
${
NC
}
"
fi
echo
-e
"
${
GREEN_DARK
}
To access
${
productName
}
${
NC
}
: use
${
GREEN_UNDERLINE
}${
clientName
}${
NC
}
in shell
${
NC
}
"
...
...
packaging/tools/post.sh
浏览文件 @
0e5da7e2
...
...
@@ -75,7 +75,7 @@ fi
initd_mod
=
0
service_mod
=
2
if
p
idof
systemd &> /dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
systemd &> /dev/null
;
then
service_mod
=
0
elif
$(
which service &> /dev/null
)
;
then
service_mod
=
1
...
...
@@ -421,7 +421,7 @@ function clean_service_on_sysvinit() {
#restart_config_str="taos:2345:respawn:${service_config_dir}/taosd start"
#${csudo}sed -i "\|${restart_config_str}|d" /etc/inittab || :
if
p
idof
taosd &> /dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
taosd &> /dev/null
;
then
${
csudo
}
service taosd stop
||
:
fi
...
...
@@ -512,6 +512,11 @@ function install_service_on_launchctl() {
${
csudo
}
cp
${
install_main_dir
}
/service/com.taosdata.taosd.plist /Library/LaunchDaemons/com.taosdata.taosd.plist
||
:
${
csudouser
}
launchctl load
-w
/Library/LaunchDaemons/com.taosdata.taosd.plist
||
:
fi
if
[
-f
${
install_main_dir
}
/service/com.taosdata.taosadapter.plist
]
;
then
${
csudouser
}
launchctl unload
-w
/Library/LaunchDaemons/com.taosdata.taosadapter.plist
>
/dev/null 2>&1
||
:
${
csudo
}
cp
${
install_main_dir
}
/service/com.taosdata.taosadapter.plist /Library/LaunchDaemons/com.taosdata.taosadapter.plist
||
:
${
csudouser
}
launchctl load
-w
/Library/LaunchDaemons/com.taosdata.taosadapter.plist
||
:
fi
}
function
install_taosadapter_service
()
{
...
...
packaging/tools/preun.sh
浏览文件 @
0e5da7e2
...
...
@@ -25,7 +25,7 @@ fi
initd_mod
=
0
service_mod
=
2
if
p
idof
systemd &> /dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
systemd &> /dev/null
;
then
service_mod
=
0
elif
$(
which service &> /dev/null
)
;
then
service_mod
=
1
...
...
@@ -82,7 +82,7 @@ function clean_service_on_sysvinit() {
#restart_config_str="taos:2345:respawn:${service_config_dir}/taosd start"
#${csudo}sed -i "\|${restart_config_str}|d" /etc/inittab || :
if
p
idof
taosd &> /dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
taosd &> /dev/null
;
then
echo
"TDengine taosd is running, stopping it..."
${
csudo
}
service taosd stop
||
:
fi
...
...
packaging/tools/remove.sh
浏览文件 @
0e5da7e2
...
...
@@ -55,7 +55,7 @@ fi
initd_mod
=
0
service_mod
=
2
if
p
idof
systemd &>/dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
systemd &>/dev/null
;
then
service_mod
=
0
elif
$(
which service &>/dev/null
)
;
then
service_mod
=
1
...
...
@@ -171,12 +171,12 @@ function clean_service_on_systemd() {
}
function
clean_service_on_sysvinit
()
{
if
p
idof
${
serverName
}
&>/dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
${
serverName
}
&>/dev/null
;
then
echo
"
${
productName
}
${
serverName
}
is running, stopping it..."
${
csudo
}
service
${
serverName
}
stop
||
:
fi
if
p
idof
tarbitrator &>/dev/null
;
then
if
p
s aux |
grep
-v
grep
|
grep
tarbitrator &>/dev/null
;
then
echo
"
${
productName
}
tarbitrator is running, stopping it..."
${
csudo
}
service tarbitratord stop
||
:
fi
...
...
@@ -215,6 +215,8 @@ function clean_service_on_sysvinit() {
function
clean_service_on_launchctl
()
{
${
csudouser
}
launchctl unload
-w
/Library/LaunchDaemons/com.taosdata.taosd.plist
>
/dev/null 2>&1
||
:
${
csudo
}
rm
/Library/LaunchDaemons/com.taosdata.taosd.plist
>
/dev/null 2>&1
||
:
${
csudouser
}
launchctl unload
-w
/Library/LaunchDaemons/com.taosdata.taosadapter.plist
>
/dev/null 2>&1
||
:
${
csudo
}
rm
/Library/LaunchDaemons/com.taosdata.taosadapter.plist
>
/dev/null 2>&1
||
:
}
function
clean_service
()
{
...
...
packaging/tools/remove_client.sh
浏览文件 @
0e5da7e2
...
...
@@ -28,7 +28,7 @@ if command -v sudo > /dev/null; then
fi
function
kill_client
()
{
if
[
-n
"
$(
p
idof
${
clientName
}
)
"
]
;
then
if
[
-n
"
$(
p
s aux |
grep
-v
grep
|
grep
${
clientName
}
)
"
]
;
then
${
csudo
}
kill
-9
$pid
||
:
fi
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录