如何使用工头导出到upstart? [英] How to use foreman to export to upstart?

查看:136
本文介绍了如何使用工头导出到upstart?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将应用程式汇出至其他流程管理格式/系统(特别是 upstart )。在这种情况下,我遇到了一些障碍,主要是由于缺乏文档。

I am trying to export my application to another process management format/system (specifically, upstart). In doing so, I have come across a number of roadblocks, mostly due to lacking documentation.

作为非root用户,我运行以下命令a href =http://blog.daviddollar.org/2011/05/06/introducing-foreman.html>此处):

As a non-root user, I ran the following command (as shown here):

-bash> foreman export upstart /etc/init
ERROR: Could not create: /etc/init

我无法创建目录,因为权限不足,所以我使用 sudo

I "could not create" the directory due to inadequate permissions, so I used sudo:

-bash> sudo foreman export upstart /etc/init
Password:
ERROR: Could not chown /var/log/app to app

我无法选择...应用程式,因为没有使用者名为 app

I "could not chown... to app" because there is no user named app.

应用程式在哪里?

如何使用forman导出到upstart ?

How should I use forman to export to upstart?

推荐答案

app 默认为 应用程序名称当对应的选项( - app - user >)不使用。有关可用选项,请参见工头手册页,但请注意,在撰写本文时,官方摘要不包括 [options]

app is default for both the name of the app and the name of the user the application should be run as when the corresponding options (--app and --user) are not used. See the foreman man page for the available options, but note that at the time of this writing the official synopsis did not include [options]:

foreman export [options] <format> [location]

示例:

-bash> sudo foreman export --app foo --user bar upstart /etc/init
Password:
[foreman export] writing: foo.conf
[foreman export] writing: foo-web.conf
[foreman export] writing: foo-web-1.conf
[foreman export] writing: foo-worker.conf
[foreman export] writing: foo-worker-1.conf

结果:

-bash> l /etc/init/
total 80
drwxr-xr-x  12 root  wheel   408 20 Oct 09:31 .
drwxr-xr-x  94 root  wheel  3196 20 Oct 08:05 ..
-rw-r--r--   1 root  wheel   236 20 Oct 09:31 foo-web-1.conf
-rw-r--r--   1 root  wheel    41 20 Oct 09:31 foo-web.conf
-rw-r--r--   1 root  wheel   220 20 Oct 09:31 foo-worker-1.conf
-rw-r--r--   1 root  wheel    41 20 Oct 09:31 foo-worker.conf
-rw-r--r--   1 root  wheel   315 20 Oct 09:31 foo.conf

-bash> l /var/log/foo/
total 0
drwxr-xr-x   2 bar     wheel    68 20 Oct 09:31 .
drwxr-xr-x  45 root    wheel  1530 20 Oct 09:31 ..

这篇关于如何使用工头导出到upstart?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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