1

Centos 6 ( http://shopify.github.io/dashing/ )で Shopify ダッシュボードを実行しています。git から更新を取得するときに、ブート時および cron 経由でこれを開始したいと考えています。

ダッシュボードを起動するためにコマンドラインから実行するのと同じコードである bash スクリプトに次のコードがあります。

#!/bin/bash

cd /usr/share/dashboard/

dashing start -p 500 -d

コマンドラインから root ユーザーとして実際のスクリプトを実行すると、問題なくアプリケーションが起動します。

ただし、このスクリプトを cron 経由または起動時に実行すると、アプリケーションは起動しません。

なぜこれが当てはまるのか、誰かが光を当てることができれば、それは最もありがたいことです.

4

1 に答える 1

0

Per my comment I am still not 100% sure that the script is being run as root. I would add a line in the script:

echo $user > /tmp/test.txt

Then run the script via cron and see what the value of the file is.

Also I question your script. Why is it necessary to cd?

How about

/usr/share/dashboard/dashing start -p 500 -d

Also you may have to do a nohup, which is the no hang up signal, so ...

nohup /usr/share/dashboard/dashing start -p 500 -d

Those are my guesses.

于 2013-07-12T17:00:57.647 に答える