人気ブログランキング | 話題のタグを見る
[PC]UBUNTU 12.04 Wizd を自動起動のまとめ
ああ勘違い!
init.dのスケルトンで簡単にしようと思っていたが、あれは、自分でデーモン化しないプログラム用のものでした。
というわけで、簡単なのをこさえました。
#!/bin/sh
#
# Start up script for wizd
#
# chkconfig: 345 96 15
# description: wizd is an server software for MediaWiz
# config: /etc/wizd.conf
#

# See how we were called.
case "$1" in
start)
echo "Starting wizd: "
/usr/sbin/wizd
;;
stop)
echo "Shutting down wizd: "
/usr/bin/killall wizd
;;
restart)
$0 stop
$0 start
;;
*)
echo -n "Usage: $0 {start|stop|restart"
exit 1
esac

exit 0

これを、/etc/init.d/wizdとして作って、chmod a+x (でいいでしょう)
# update-rc.d wizd defaults
# reboot
# ps -ax | grep wizd
root 1032 0.0 0.0 2276 92 ? S 21:15 0:00 /root/bin/wizd/wizd
root 1034 0.0 0.0 2276 92 ? S 21:15 0:00 /root/bin/wizd/wizd
root 2240 0.0 0.0 5344 844 pts/0 S+ 21:17 0:00 grep --color=auto wizd
確認できました。
 しかし、やはりwizdの一般のやり方のディレクトリではうまくいきませんでした。/sbin/wizdは以前書いたスクリプトです。
by mifjpn | 2012-06-13 21:22 | パソコン
<< REX-220CXDの不具合 [PC]P5QPL-AM ぐず... >>