gn="justify"> * Запуск перевірки стану запуску
*/runCheckDaemon () {. append (" nПроверка nзапуска демонів ... n n"); dr = new DoRuntime (); {(dr.isRunning () == true) {. append ("sshd: не запущені "+" n "); _runButton.setEnabled (true); _stopButton.setEnabled (false);}
} catch (IOException ex) {}}
[] getOutput (String command) throws IOException {[] output = new String [12]; arg = command; runtime = Runtime.getRuntime (); process = runtime.exec (arg); is = process.getInputStream (); isr = new InputStreamReader (is); br = new BufferedReader (isr); line = ""; comWords [] = command.split (" s +"); words [] ; (comWords [0]) {"users":
output [0] = " nВ даний момент в системі n"; [1] = "працюють наступні n"; [2] = "користувачі: n n" ;
int j = 3; ((line = br.readLine ())! = null) {= line.split (" s +"); (int i = 0; i < ; words.length; i + +) [j] = words [i] + " n";
j + +;}; "groups": [0] = " nПолучаем інформацію про те, n"; [1] = "в які групи входять n"; [2] = "користувачі. Формат виводу - n "; [3] =" імя_пользователя: імя_группи n n ";
int i = 4; ((line = br.readLine ())! = null) {[i] = line + " n"; + +;}} output;} p>
addGroupComponentsHide () {. setVisible (false);. setVisible (false);. pack ();}
prepUsermod (String
@ SuppressWarnings ("unchecked") Generate code
void formWindowClosing (java.awt.event.WindowEvent evt) {n = JOptionPane.showConfirmDialog (. rootPane,
"Ви дійсно хочете вийти?",
"Confirm",
JOptionPane.YES_NO_OPTION); (n == 0) {();. exit (1);}}
void groupsButtonActionPerformed (java.awt.event.ActionEvent evt)
{. setVisible (true);}
void delgroupButtonActionPerformed (java.awt.event.ActionEvent
evt) {. setVisible (true);}
void chmodButtonActionPerformed (java.awt.event.ActionEvent evt)
{. setVisible (true);}
void chmodOKActionPerformed (java.awt.event.ActionEvent evt) {file_name = "chmod.sh"; [] com = {chmodCommand.getText ()}; ex_com1 = "chmod + x part1 /"+ file_name; ex_com2 =" gnome-terminal-x part1/"+ file_name; {(file_name, com); (ex_com1); (ex_com2);
} catch (IOException ex) {}}
void chmodCancelActionPerformed (java.awt.event.ActionEvent evt)
{();. setVisible (false);}
void chownButtonActionPerformed (java.awt.event.ActionEvent evt)
{. setVisible (true);}
void chmodDiscardActionPerformed (java.awt.event.ActionEvent