OSDN Git Service

modified: epgwakealarm.php 若干修正
authorepgrec@park.mda.or.jp <yoneda@localhost.localdomain>
Tue, 28 Feb 2012 08:14:49 +0000 (17:14 +0900)
committerepgrec@park.mda.or.jp <yoneda@localhost.localdomain>
Tue, 28 Feb 2012 08:14:49 +0000 (17:14 +0900)
modified:   getepg.php                 若干修正
new file:   sudoers.d/01_first         必要なsudoの設定

epgwakealarm.php
getepg.php
sudoers.d/01_first [new file with mode: 0755]

index 74ede90..7b56f34 100755 (executable)
                }
                else if( (intval($wakeupvars->getepg_time) + intval($settings->getepg_timer) * 3600 ) <= time() ) {
                        $wakeupvars->reason = "getepg";
-                       exec( INSTALL_PATH."/getepg.php" );
+                       exec( INSTALL_PATH."/getepg.php >/dev/null 2>&1" );
                        $wakeupvars->getepg_time = time();
                }
                else {
                        $wakeupvars->reason = "other";
                }
                $wakeupvars->asXML(INSTALL_PATH. "/settings/wakeupvars.xml");
+               chown(INSTALL_PATH. "/settings/wakeupvars.xml", 0666 );
        }
        catch( Exception $e ) {
                //
index 58432ac..674a476 100755 (executable)
        if( pcntl_fork() != 0 )
                exit;
        pcntl_signal(SIGTERM, "handler");
+
+       fclose(STDIN);
+       fclose(STDOUT);
+       fclose(STDERR);
   }
   
   function check_file( $file ) {
diff --git a/sudoers.d/01_first b/sudoers.d/01_first
new file mode 100755 (executable)
index 0000000..c53dcce
--- /dev/null
@@ -0,0 +1,2 @@
+www-data ALL=NOPASSWD: /sbin/shutdown
+root    ALL=(ALL:ALL) ALL