view install/step1.php @ 161:84220382fea8

mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
author epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
date Sun, 04 Apr 2010 17:10:17 +0900
parents 3ec5ca5e56ca
children
line wrap: on
line source

<?php

// 若激с潟菴
function getPerm( $file ) {
	
	$ss = @stat( $file );
	return sprintf("%o", ($ss['mode'] & 000777));
}

echo "<p><b>epgrecゃ潟鴻若倶с障</b></p>";

// config.php絖腆肴

if(! file_exists( "../config.php" ) ) {
	@copy( "../config.php.sample", "../config.php" );
	if( ! file_exists( "../config.php" ) ) {
		exit("config.php絖障<br>config.php.sample若遺吾帥c潟膩<br>");
	}
}

include_once("../config.php");
include_once(INSTALL_PATH."/reclib.php");

// do-record.sh絖с

if(! file_exists( DO_RECORD ) ) {
	exit("do-record.sh絖障<br>do-record.sh.pt1do-record.sh.friio篏<br>" );
}


// 若激с潟с

$rw_dirs = array( 
	INSTALL_PATH."/templates_c",
	INSTALL_PATH."/video",
	INSTALL_PATH."/thumbs",
	INSTALL_PATH."/settings",
	INSTALL_PATH."/cache",
);

$gen_thumbnail = INSTALL_PATH."/gen-thumbnail.sh";
if( defined("GEN_THUMBNAIL") )
	$gen_thumbnail = GEN_THUMBNAIL;


$exec_files = array(
	DO_RECORD,
//	COMPLETE_CMD,
	RECORDER_CMD,
	INSTALL_PATH."/getepg.php",
	INSTALL_PATH."/storeProgram.php",
	$gen_thumbnail,
);

echo "<p><b>c若激с潟с鐚777鐚</b></p>";
echo "<div>";
foreach($rw_dirs as $value ) {
	echo $value;
	
	$perm = getPerm( $value );
	if( $perm != "777" ) {
		exit('<font color="red">...'.$perm.'... missing</font><br>c吾莨若粋┗鐚ex. chmod 777 '.$value.'鐚</div>' );
	}
	echo "...".$perm."...ok<br>";
}
echo "</div>";


echo "<p><b><ゃ若激с潟с鐚755鐚</b></p>";
echo "<div>";
foreach($exec_files as $value ) {
	echo $value;
	
	$perm = getPerm( $value );
	if( !($perm == "755" || $perm == "775" || $perm == "777") ) {
		exit('<font color="red">...'.$perm.'... missing</font><br><ゃ絎茵鐚ex. chmod 755 '.$value.'鐚</div>');
	}
	echo "...".$perm."...ok<br>";
}
echo "</div>";

if( !file_exists( "/usr/local/bin/grscan" ) ) {

echo "<p><b>遺吾帥c潟荐絎腆肴</b></p>";

echo "<div>憜config.phpс篁ヤc潟篆<荐絎障篆>純c潟羞激c腟茵茵腓冴с障</div>";

echo "<ul>";
foreach( $GR_CHANNEL_MAP as $key => $value ) {
	echo "<li>c潟".$value."</li>";
}
echo "</ul>";

echo '<p><a href="step2.php">篁ヤ腆肴罨<荐絎蚊</a></p>';

}
else {

echo'<p><b>遺吾帥c潟荐絎</b><p>';
echo '
<form method="post" action="grscan.php" >
<div>遺吾帥c潟鴻c潟紮障鴻c潟10鐔20腮綺障宴若篏帥鴻筝с鴻潟</div>
  <div>宴若篏睡:<input type="checkbox" name="catv" value="1" /></div>

  <input type="submit" value="鴻c潟紮" />
</form>';
}
?>