Browse Source

Install /usr/bin/ launcher as requested by Patrick Kuijvenhoven in (https://github.com/ercpe/smart-check/issues/2).

tags/0.3.1
Johann Schmitz 2 years ago
parent
commit
e7d5bb3bc2
2 changed files with 11 additions and 2 deletions
  1. 6
    1
      setup.py
  2. 5
    1
      smartcheck/__main__.py

+ 6
- 1
setup.py View File

@@ -15,7 +15,12 @@ setup(
download_url='https://code.not-your-server.de/smart-check.git/tags/',
packages=find_packages('.'),
include_package_data=True,
package_data = {'': ['*.yaml']},
package_data={'': ['*.yaml']},
zip_safe=False,
license='GPL-3',
entry_points={
'console_scripts': [
'smart-check = smartcheck.__main__:main'
]
},
)

+ 5
- 1
smartcheck/__main__.py View File

@@ -30,7 +30,7 @@ def execute_smartctl(drive, interface=None, sudo=None, smartctl_path=None, smart
# raise Exception("smartctl failed with status code %s" % process.returncode)
return output

if __name__ == "__main__":
def main():
parser = ArgumentParser()

parser.add_argument('--disks-file', default=DEFAULT_DISKS_FILE)
@@ -125,3 +125,7 @@ if __name__ == "__main__":

print(msg)
sys.exit(exit_code)


if __name__ == "__main__":
main()

Loading…
Cancel
Save