Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
487d5b77
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
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看板
提交
487d5b77
编写于
12月 31, 2021
作者:
Z
zyyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change
上级
e3b99326
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
2 addition
and
147 deletion
+2
-147
packaging/rpm/powerd
packaging/rpm/powerd
+0
-145
packaging/tools/makepkg.sh
packaging/tools/makepkg.sh
+2
-2
未找到文件。
packaging/rpm/powerd
已删除
100644 → 0
浏览文件 @
e3b99326
#!/bin/bash
#
# power This shell script takes care of starting and stopping PowerDB.
#
# chkconfig: 2345 99 01
# description: PowerDB is a districuted, scalable, high-performance Time Series Database
# (TSDB). More than just a pure database, PowerDB also provides the ability
# to do stream computing, aggregation etc.
#
#
### BEGIN INIT INFO
# Provides: powerd
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Short-Description: start and stop powerd
# Description: PowerDB is a districuted, scalable, high-performance Time Series Database
# (TSDB). More than just a pure database, PowerDB also provides the ability
# to do stream computing, aggregation etc.
### END INIT INFO
# Source init functions
.
/etc/init.d/functions
# Maximum number of open files
MAX_OPEN_FILES
=
65535
# Default program options
NAME
=
powerd
PROG
=
/usr/local/power/bin/powerd
USER
=
root
GROUP
=
root
# Default directories
LOCK_DIR
=
/var/lock/subsys
PID_DIR
=
/var/run/
$NAME
# Set file names
LOCK_FILE
=
$LOCK_DIR
/
$NAME
PID_FILE
=
$PID_DIR
/
$NAME
.pid
[
-e
$PID_DIR
]
||
mkdir
-p
$PID_DIR
PROG_OPTS
=
""
start
()
{
echo
-n
"Starting
${
NAME
}
: "
# check identity
curid
=
"
`
id
-u
-n
`
"
if
[
"
$curid
"
!=
root
]
&&
[
"
$curid
"
!=
"
$USER
"
]
;
then
echo
"Must be run as root or
$USER
, but was run as
$curid
"
return
1
fi
# Sets the maximum number of open file descriptors allowed.
ulimit
-n
$MAX_OPEN_FILES
curulimit
=
"
`
ulimit
-n
`
"
if
[
"
$curulimit
"
-lt
$MAX_OPEN_FILES
]
;
then
echo
"'ulimit -n' must be greater than or equal to
$MAX_OPEN_FILES
, is
$curulimit
"
return
1
fi
if
[
"
`
id
-u
-n
`
"
==
root
]
;
then
# Changes the owner of the lock, and the pid files to allow
# non-root OpenTSDB daemons to run /usr/share/opentsdb/bin/opentsdb_restart.py.
touch
$LOCK_FILE
&&
chown
$USER
:
$GROUP
$LOCK_FILE
touch
$PID_FILE
&&
chown
$USER
:
$GROUP
$PID_FILE
daemon
--user
$USER
--pidfile
$PID_FILE
"
$PROG
$PROG_OPTS
&> /dev/null &"
else
# Don't have to change user.
daemon
--pidfile
$PID_FILE
"
$PROG
$PROG_OPTS
&> /dev/null &"
fi
retval
=
$?
sleep
2
echo
[
$retval
-eq
0
]
&&
(
findproc
>
$PID_FILE
&&
touch
$LOCK_FILE
)
return
$retval
}
stop
()
{
echo
-n
"Stopping
${
NAME
}
: "
killproc
-p
$PID_FILE
$NAME
retval
=
$?
echo
# Non-root users don't have enough permission to remove pid and lock files.
# So, the opentsdb_restart.py cannot get rid of the files, and the command
# "service opentsdb status" will complain about the existing pid file.
# Makes the pid file empty.
echo
>
$PID_FILE
[
$retval
-eq
0
]
&&
(
rm
-f
$PID_FILE
&&
rm
-f
$LOCK_FILE
)
return
$retval
}
restart
()
{
stop
start
}
reload
()
{
restart
}
force_reload
()
{
restart
}
rh_status
()
{
# run checks to determine if the service is running or use generic status
status
-p
$PID_FILE
-l
$LOCK_FILE
$NAME
}
rh_status_q
()
{
rh_status
>
/dev/null 2>&1
}
case
"
$1
"
in
start
)
rh_status_q
&&
exit
0
$1
;;
stop
)
rh_status_q
||
exit
0
$1
;;
restart
)
$1
;;
reload
)
rh_status_q
||
exit
7
$1
;;
force-reload
)
force_reload
;;
status
)
rh_status
;;
condrestart|try-restart
)
rh_status_q
||
exit
0
restart
;;
*
)
echo
"Usage:
$0
{start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit
2
esac
exit
$?
packaging/tools/makepkg.sh
浏览文件 @
487d5b77
...
...
@@ -146,8 +146,8 @@ if [ -f "${cfg_dir}/nginxd.service" ]; then
fi
mkdir
-p
${
install_dir
}
/bin
&&
cp
${
bin_files
}
${
install_dir
}
/bin
&&
chmod
a+x
${
install_dir
}
/bin/
*
||
:
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_deb
}
${
install_dir
}
/init.d/
${
serverName
}
.deb
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_rpm
}
${
install_dir
}
/init.d/
${
serverName
}
.rpm
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_deb
}
${
install_dir
}
/init.d/
taos
.deb
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_rpm
}
${
install_dir
}
/init.d/
taos
.rpm
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_tarbitrator_deb
}
${
install_dir
}
/init.d/tarbitratord.deb
||
:
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_tarbitrator_rpm
}
${
install_dir
}
/init.d/tarbitratord.rpm
||
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录