annotate install/step1.php @ 47:a701aaf6d216

add: gen-thumbnail.sh
author Sushi-k <epgrec@park.mda.or.jp>
date Tue, 28 Jul 2009 18:48:32 +0900
parents 01a8fdc0cebb
children be9e4520cfec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
41
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
42 $exec_files = array(
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
43 DO_RECORD,
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
44 COMPLETE_CMD,
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
45 INSTALL_PATH."/getepg.php",
47
a701aaf6d216 add: gen-thumbnail.sh
Sushi-k <epgrec@park.mda.or.jp>
parents: 32
diff changeset
46 GEN_THUMBNAIL,
32
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
47 );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
48
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
49 echo "<p><b>ディレクトリのパーミッションチェック(777)</b></p>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
50 echo "<div>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
51 foreach($rw_dirs as $value ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
52 echo $value;
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
53
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
54 $perm = getPerm( $value );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
55 if( $perm != "777" ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
56 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
57 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
58 echo "...".$perm."...ok<br>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
59 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
60 echo "</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
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
63 echo "<p><b>ファイルのパーミッションチェック(755)</b></p>";
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 foreach($exec_files as $value ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
66 echo $value;
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
67
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
68 $perm = getPerm( $value );
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
69 if( !($perm == "755" || $perm == "775" || $perm == "777") ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
70 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
71 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
72 echo "...".$perm."...ok<br>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
73 }
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
74 echo "</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 "<p><b>地上デジタルチャンネルの設定確認</b></p>";
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>現在、config.phpでは以下のチャンネルの受信が設定されています。受信不可能なチャンネルが混ざっていると番組表が表示できません。</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 "<ul>";
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
81 foreach( $GR_CHANNEL_MAP as $key => $value ) {
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
82 echo "<li>物理チャンネル".$value."</li>";
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
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
86
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
87 echo '<p><a href="step2.php">以上を確認し次の設定に進む</a></p>';
01a8fdc0cebb testing: Web base setting page.
Sushi-k <epgrec@park.mda.or.jp>
parents:
diff changeset
88
47
a701aaf6d216 add: gen-thumbnail.sh
Sushi-k <epgrec@park.mda.or.jp>
parents: 32
diff changeset
89 ?>