Mercurial > epgrec.yaz
annotate install/step1.php @ 56:be9e4520cfec
change: GEN_THUMBNAIL
author | yoneda <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Tue, 28 Jul 2009 23:35:31 +0900 |
parents | a701aaf6d216 |
children | 69e0dabc765a |
rev | line source |
---|---|
32
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
1 <?php |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
2 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
3 // パーミッションを返す |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
4 function getPerm( $file ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
5 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
6 $ss = @stat( $file ); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
7 return sprintf("%o", ($ss['mode'] & 000777)); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
8 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
9 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
10 echo "<p><b>epgrecのインストール状態をチェックします</b></p>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
11 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
12 // config.phpの存在確認 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
13 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
14 if(! file_exists( "../config.php" ) ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
15 @copy( "../config.php.sample", "../config.php" ); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
16 if( ! file_exists( "../config.php" ) ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
17 exit("config.phpが存在しません<br>config.php.sampleをリネームし地上デジタルチャンネルマップを編集してください<br>"); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
18 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
19 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
20 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
21 include_once("../config.php"); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
22 include_once(INSTALL_PATH."/reclib.php"); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
23 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
24 // do-record.shの存在チェック |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
25 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
26 if(! file_exists( DO_RECORD ) ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
27 exit("do-record.shが存在しません<br>do-record.sh.pt1やdo-record.sh.friioを参考に作成してください<br>" ); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
28 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
29 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
30 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
31 // パーミッションチェック |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
32 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
33 $rw_dirs = array( |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
34 INSTALL_PATH."/templates_c", |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
35 INSTALL_PATH."/video", |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
36 INSTALL_PATH."/thumbs", |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
37 INSTALL_PATH."/settings", |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
38 INSTALL_PATH."/cache", |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
39 ); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
40 |
56
be9e4520cfec
change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
47
diff
changeset
|
41 $gen_thumbnail = INSTALL_PATH."/gen-thumbnail.sh"; |
be9e4520cfec
change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
47
diff
changeset
|
42 if( defined("GEN_THUMBNAIL") ) |
be9e4520cfec
change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
47
diff
changeset
|
43 $gen_thumbnail = GEN_THUMBNAIL; |
be9e4520cfec
change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
47
diff
changeset
|
44 |
32
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
45 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
46 $exec_files = array( |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
47 DO_RECORD, |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
48 COMPLETE_CMD, |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
49 INSTALL_PATH."/getepg.php", |
56
be9e4520cfec
change: GEN_THUMBNAIL
yoneda <yoneda@recorder.localnet.mda.or.jp>
parents:
47
diff
changeset
|
50 $gen_thumbnail, |
32
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
51 ); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
52 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
53 echo "<p><b>ディレクトリのパーミッションチェック(777)</b></p>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
54 echo "<div>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
55 foreach($rw_dirs as $value ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
56 echo $value; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
57 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
58 $perm = getPerm( $value ); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
59 if( $perm != "777" ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
60 exit('<font color="red">...'.$perm.'... missing</font><br>このディレクトリを書き込み許可にしてください(ex. chmod 777 '.$value.')</div>' ); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
61 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
62 echo "...".$perm."...ok<br>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
63 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
64 echo "</div>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
65 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
66 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
67 echo "<p><b>ファイルのパーミッションチェック(755)</b></p>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
68 echo "<div>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
69 foreach($exec_files as $value ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
70 echo $value; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
71 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
72 $perm = getPerm( $value ); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
73 if( !($perm == "755" || $perm == "775" || $perm == "777") ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
74 exit('<font color="red">...'.$perm.'... missing</font><br>このファイルを実行可にしてください(ex. chmod 755 '.$value.')</div>'); |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
75 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
76 echo "...".$perm."...ok<br>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
77 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
78 echo "</div>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
79 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
80 echo "<p><b>地上デジタルチャンネルの設定確認</b></p>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
81 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
82 echo "<div>現在、config.phpでは以下のチャンネルの受信が設定されています。受信不可能なチャンネルが混ざっていると番組表が表示できません。</div>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
83 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
84 echo "<ul>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
85 foreach( $GR_CHANNEL_MAP as $key => $value ) { |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
86 echo "<li>物理チャンネル".$value."</li>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
87 } |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
88 echo "</ul>"; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
89 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
90 |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
91 echo '<p><a href="step2.php">以上を確認し次の設定に進む</a></p>'; |
01a8fdc0cebb
testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff
changeset
|
92 |
47 | 93 ?> |