Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议提供一个脚本, 可以把lealone注册为系统服务 #181

Open
zhoujin7 opened this issue May 22, 2023 · 5 comments
Open

建议提供一个脚本, 可以把lealone注册为系统服务 #181

zhoujin7 opened this issue May 22, 2023 · 5 comments

Comments

@zhoujin7
Copy link

建议提供一个bat脚本, 可以把lealone注册为windows系统服务. 我有空研究下. h2有这个功能.

@codefollower
Copy link
Member

codefollower commented May 22, 2023

h2 service 太重了,依赖不少东西,不太想引入。

在 windows 可以用 javaw 替换 java,这样可以把 java 程序当成一个后台进程运行,
比如 javaw -jar lealone-5.2.0.jar 就可以在后台运行 lealone

java -jar lealone-5.2.0.jar -client -sql "shutdown server" 可以关闭后台的 lealone 进程。

从 lealone-5.2.0 开始支持 shutdown server 语句。

@ContyChen
Copy link

自己临时用的是 winsw,可以参考以下 https://github.com/winsw/winsw

@ContyChen
Copy link

shutdown server 无法正常关闭进程,后台进程还在

通过lealone.bat、sqlshell 执行提示:
image

@codefollower
Copy link
Member

lealone-5.2 才支持 shutdown server,lealone-5.1.2 有个试验功能,需要用 admin shutdown server

h2 service 就是用 Wrapper,还是挺重的,如果确实很需要这项功能,可以做一个 lealone 插件,不想把这些非核心的功能放到 lealone 里。

@ContyChen
Copy link

明白,期待5.2版本了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants