Exemple #1
0
def startSmartd(): 
    smartd.startDaemon();
    if smartd.daemonRunning():
        if showPopups:
            xbmc.executebuiltin("Notification(smartmontools, " + addon.getLocalizedString(50001)+ ", 7, " + icon + ")");  # smartd started
    else:
        xbmc.log(consts.logHeader + "failed to start smartd", xbmc.LOGERROR);
        xbmcgui.Dialog().ok(consts.dialogHeader, addon.getLocalizedString(50024));   # Failed to start smartd
Exemple #2
0
def startSmartd():
    smartd.startDaemon()
    if smartd.daemonRunning():
        if showPopups:
            xbmc.executebuiltin("Notification(smartmontools, " +
                                addon.getLocalizedString(50001) + ", 7, " +
                                icon + ")")
            # smartd started
    else:
        xbmc.log(consts.logHeader + "failed to start smartd", xbmc.LOGERROR)
        xbmcgui.Dialog().ok(consts.dialogHeader,
                            addon.getLocalizedString(50024))
Exemple #3
0
def startService():
    if not sutils.isFileExecutableByOwner(consts.script):
        sutils.addExecPermissions(execDir, True);
        
    smartmontools.checkConfigurationFilesExistance();

    if addon.getSetting(consts.settingDBupdates ) == "true":
        smartmontools.updateDatabase();

    if addon.getSetting(consts.settingRunDaemonOnStartup ) == "true":        
        smartd.startDaemon();
        if smartd.daemonRunning():
            if addon.getSetting(consts.settingSmartdStartupPopup) == True:
                xbmc.executebuiltin("Notification(smartmontools, " + addon.getLocalizedString(50001)+ ", 7, " + icon + ")");  # smartd started
        else:
            xbmc.log(consts.logHeader + "failed to start smartd", xbmc.LOGERROR);
            xbmcgui.Dialog().ok(consts.dialogHeader, addon.getLocalizedString(50024));
def startService():
    if not sutils.isFileExecutableByOwner(consts.script):
        sutils.addExecPermissions(execDir, True)

    smartmontools.checkConfigurationFilesExistance()

    if addon.getSetting(consts.settingDBupdates) == "true":
        smartmontools.updateDatabase()

    if addon.getSetting(consts.settingRunDaemonOnStartup) == "true":
        smartd.startDaemon()
        if smartd.daemonRunning():
            if addon.getSetting(consts.settingSmartdStartupPopup) == True:
                xbmc.executebuiltin("Notification(smartmontools, " +
                                    addon.getLocalizedString(50001) + ", 7, " +
                                    icon + ")")
                # smartd started
        else:
            xbmc.log(consts.logHeader + "failed to start smartd",
                     xbmc.LOGERROR)
            xbmcgui.Dialog().ok(consts.dialogHeader,
                                addon.getLocalizedString(50024))