#!/usr/bin/python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------
# This file is part of WAPT
# Copyright (C) 2013 Tranquil IT Systems http://www.tranquil.it
# WAPT aims to help Windows systems administrators to deploy
# setup and update applications on users PC.
#
# WAPT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# WAPT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WAPT. If not, see <http://www.gnu.org/licenses/>.
#
# -----------------------------------------------------------------------
import platform
from setuphelpers import *
uninstallkey=[]
uninstallstring=['"%s" /S' % makepath(programfiles32,'Munin Node for Windows','uninstall.exe')]
required_params=[]
def install():
if service_installed('munin node for windows'):
print("Munin Node is running, stopping the service...")
service_stop('munin node for windows')
print("Install Munin Node service")
run('munin-node-win32-1.6.0.0-installer.exe /S')
print("Add configuration file")
filecopyto('munin-node.ini',"%s" % makepath(programfiles32,'Munin Node For Windows','munin-node.ini'))
print("Starting Munin Node service...")
service_start('munin node for windows')
print("Done")