<?php
 class Restarter { var $radname = 'radiusd'; var $flag = false; var $db; public function __construct( $app) { $this->owner = $app; $this->db = $this->owner->load_db_resource( get_class($this)); $this->flag = $this->db->get_flag(); return $this; } public function restart( $immediatly=false) { $res = 0; $this->owner->log(CMMN_INFO, '', __FILE__, __LINE__, '', 'restart called!'); if ( $this->flag || $immediatly) { exec_event_exec('/etc/init.d/radiusd restart'); $res = 1; } if ( $res) $this->db->clean_flag(); } } ?>
