/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui;

/**
 *
 * @author ptribble
 */
public class threadedcommand implements Runnable {

    static String finalpart;

    public static void setFinalpart(String data) {
        finalpart = data;
    }
    public static boolean interupt = true;
    public static boolean systembackup = false;
    public static boolean homebackup = false;

    public static String getFinalpart() {
        return finalpart;
    }

    public void run() {
        if (systembackup) {
            Menu.halfmenu();
            MephUtil.messageparser("\n" + "Running Backup configuration:" + Settings.Name);
            MephUtil.shell(getFinalpart());
            Settings.setSizecheckerstatus(2);
            if (Settings.getSelinux() == 1) {
                plugins.enableselinux();
            }
            if (Settings.modify != 0) {
                Backup.restorefstab();
            }
            Settings.setCheckermessage("\n Status of operation......\n\nFile Size = ");
            MephUtil.filecheckerDie(Settings.Backuplocation + Settings.Name + ".tar");
            gui.Menu.halfmenu();
            MephUtil.messageparserln("\n\nBackup Complete!");
            tarsize.tar();
        }
    }
}


