RaspyFIを試す(cron解決編)

  • 投稿日:
  • by
  • カテゴリ:
  • ハッシュタグ:

以前に cronデーモンが自動で開始しないという話を書きましたが、原因が判明したようです。

Forum - RaspyFi

21 novembre 2013
14:15

admin
Admin
Forum Posts: 369
Member Since:
19 dicembre 2012
Offline
6 Quote
The RaspyFi's webui performs an update script on startup, this optimize various settings, and also disables lot of processes and daemons on startup.
Cron is disabled amongst other stuff. To avoid it to be killed, just edit the file
/var/www/command/orion_optimize.sh
You'll find this section
if [ "$2" == "startup" ]; then
## kill useless system processes
#killall -9 avahi-daemon
#killall -9 dbus-daemon
killall -9 exim4
killall -9 ntpd
killall -9 rpc.idmapd
killall -9 rpc.statd
killall -9 rpcbind
killall -9 thd
killall -9 udevd
#killall -9 automount
killall -9 cron
killall -9 atd
#killall -9 dhclient
killall -9 startpar
just comment "killall -9 cron", so it becomes #killall -9 cron Save and exit. You're now fine.

なんと余計なデーモンを殺してまわるスクリプト(/var/www/command/orion_optimize.sh)が起動時に動いていたんですね。 rpcbindが自動起動しなかったのもこれが原因です。

実際にこのスクリプトを見てみると、

root@Raspyfi:~# cat /var/www/command/orion_optimize.sh
#!/bin/bash
#
#      PlayerUI Copyright (C) 2013 Andrea Coiutti & Simone De Gregori
#               Tsunamp Team
#      http://www.tsunamp.com
#
#  This Program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 3, or (at your option)
#  any later version.
#
#  This Program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with RaspyFi; see the file COPYING.  If not, see
#  <http://www.gnu.org/licenses/>.
#
#
#       UI-design/JS code by:   Andrea Coiutti (aka ACX)
#  PHP/JS code by:                      Simone De Gregori (aka Orion)
#
#  file:                                                        player_wdog.sh
#  version:                                             1.0

Tsunamp というのは既に消滅した音楽プレーヤーのプロジェクトだったようです。 RaspyFiは Tsunampの血を引いているのかな?

とりあえず cronと ntpdを活かすようにコメントアウトしました。 再起動させてみると、

Last login: Mon Nov 25 20:09:27 2013 from desktop.local
root@Raspyfi:~# /etc/init.d/cron status
[ ok ] cron is running.
root@Raspyfi:~# /etc/init.d/ntp status
[ ok ] NTP server is running.

これで朝ラジオが鳴らなくて寝坊ということもなくなるでしょう。
できれば Web UIからOn/Off出来るようにしてほしいですね。