执行命令后如何保持sbt运行(作为守护进程) [英] How to keep sbt running (as a daemon process) after executing a command

查看:212
本文介绍了执行命令后如何保持sbt运行(作为守护进程)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从sbt启动scalatra服务器.我怎么做?以下内容会启动scalatra:

I want to launch scalatra server from sbt. How do I do that? The following does launch scalatra:

sbt "container:start"

但它会立即退出:

[info] starting server ...
[success] Total time: 2 s, completed Sep 12, 2015 2:39:32 PM
> [info] waiting for server to shut down...

最可取的是,整个程序将作为守护进程在nohup中运行.

Most preferably the whole thing would run in a nohup as a daemon process.

推荐答案

sbt "; <command>; console"

可以解决问题.请注意,必须使用初始分号 .

does the trick. Note the initial semicolon is required.

这篇关于执行命令后如何保持sbt运行(作为守护进程)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆