public String getColumnName(int columnIndex) {
   if (columnIndex == 0) {
     return ControlMain.getProperty("name");
   } else if (columnIndex == 1) {
     return ControlMain.getProperty("searchInEpg");
   } else if (columnIndex == 2) {
     return ControlMain.getProperty("searchinMG");
   } else if (columnIndex == 3) {
     return ControlMain.getProperty("searchOnlyTitle");
   }
   return ControlMain.getProperty("buildTimer");
 }
Пример #2
0
 private static void createTelnetSession(String command) throws IOException, InterruptedException {
   telnet.connect(ControlMain.getActiveBox().getDboxIp());
   OutputStream ostream = telnet.getOutputStream();
   Writer writer = new OutputStreamWriter(ostream);
   writer.write(ControlMain.getActiveBox().getLogin() + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write(ControlMain.getActiveBox().getPassword() + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write(command + "\n");
   writer.flush();
   closeTelnetSession();
 }
Пример #3
0
 public static void runReboot() throws IOException, InterruptedException {
   Logger.getLogger("SerBoxTelnet").info(ControlMain.getProperty("msg_reboot"));
   telnet.connect(ControlMain.getActiveBox().getDboxIp());
   OutputStream ostream = telnet.getOutputStream();
   Writer writer = new OutputStreamWriter(ostream);
   writer.write(ControlMain.getActiveBox().getLogin() + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write(ControlMain.getActiveBox().getPassword() + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write("killall sectionsd" + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write("killall camd2" + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write("killall timerd" + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write("killall timerd" + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write("killall zapit" + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write("killall controld" + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write("killall nhttpd" + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write("sleep 3" + "\n");
   writer.flush();
   Thread.sleep(1000);
   writer.write("busybox -reboot" + "\n");
   writer.flush();
   Thread.sleep(1000);
   closeTelnetSession();
 }
Пример #4
0
 public static void runHalt() throws IOException, InterruptedException {
   Logger.getLogger("SerBoxTelnet").info(ControlMain.getProperty("msg_reboot"));
   createTelnetSession("halt");
 }
Пример #5
0
 public static void runSectiondReset() throws IOException, InterruptedException {
   Logger.getLogger("SerBoxTelnet").info(ControlMain.getProperty("msg_sectiond"));
   createTelnetSession("killall sectionsd && sectionsd");
 }
Пример #6
0
 public static void disableSPTSMode() throws IOException, InterruptedException {
   Logger.getLogger("SerBoxTelnet").info(ControlMain.getProperty("msg_DisableSPTS"));
   createTelnetSession("rm -f /var/etc/.spts_mode");
   runReboot();
 }