操作系统:Centos 7
我正在尝试将Snorby作为systemd运行,但是脚本无法正确启动
在Snorby文件夹中时,我可以在命令行上将exec导轨服务器-e development -b 0.0.0.0捆绑在一起,没有任何问题,但是当我将其放在脚本中并使用systemctl执行时,它将无法正常工作。
[Service]
WorkingDirectory=/tmp/snorby
Environment=RAILS_ENV=development
ExecStart=/usr/local/rbenv/shims/bundle exec rails server -d -b 0.0.0.0
状态输出
snorby.service - Snorby ConfiServ
Loaded: loaded (/usr/lib/systemd/system/snorby.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Thu 2017-08-03 13:25:34 UTC; 1min 18s ago
Process: 5533 ExecStart=/usr/local/rbenv/shims/bundle exec rails server -d -b 0.0.0.0 (code=exited, status=0/SUCCESS)
Main PID: 5533 (code=exited, status=0/SUCCESS)
Aug 03 13:25:32 TEST-02 systemd[1]:
Started Snorby ConfiServ.
Aug 03 13:25:32 TEST-02 systemd[1]:
Starting Snorby ConfiServ...
Aug 03 13:25:34 TEST-02 bundle[5533]:
/usr/local/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-3.2.22/lib/action_dispatch/http/mime_type.rb:102: warning: already initialized constant Mime::PDF
Aug 03 13:25:34 TEST-02 bundle[5533]:
/usr/local/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-3.2.22/lib/action_dispatch/http/mime_type.rb:102: warning: previous definition of PDF was here
Aug 03 13:25:34 TEST-02 bundle[5533]:
No time_zone specified in snorby_config.yml; detected time_zone: UTC
Aug 03 13:25:34 TEST-02 bundle[5533]: => Booting Thin
Aug 03 13:25:34 TEST-02 bundle[5533]: => Rails 3.2.22 application starting in development on http://0.0.0.0:3000