Beispiel #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
Beispiel #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))
Beispiel #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));
Beispiel #4
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))