で、rootから手動実行は無事できたのだが、crontabに登録して実行したところ、以下のエラー(警告?)がでた。
Pseudo-terminal will not be allocated because stdin is not a terminal.
ttyがアロケートされていないのでプロンプトや行バッファなどの機能が無効になっているのが原因とのこと。
で、ssh には -t オプションをつけていたのだが、なんとこの -t オプションは多段でつけられるとのこと。(へぇ)
-t Force pseudo-tty allocation. This can be used to execute arbitrary
screen-based programs on a remote machine, which can be very useful,
e.g., when implementing menu services. Multiple -t options force
tty allocation, even if ssh has no local tty.
ということで、 ssh -t -t なんてことをして解決。
なんか微妙な書き方だなぁ...
0 件のコメント :
コメントを投稿