This commit is contained in:
2024-11-25 17:23:00 +01:00
parent 69295768d5
commit 34a375c50d
12 changed files with 618 additions and 91 deletions

View File

@@ -3,6 +3,9 @@
import os, sys, subprocess
class nfs_server_conf:
"""
Diese Class installiert nur einen NFS Server mit Systemd voraussetzung ist das nsfv4 installiert ist
"""
def __init__(self, nfs_srv_folders = ["/nfsroot/publicnfs","/nfsroot/datennfs"], nfs_config_file = "/etc/exports", allow_network = "192.168.50.0/25") -> None:
if not os.geteuid()==0:
raise PermissionError("Sie sind kein Root")
@@ -95,4 +98,4 @@ class nfs_server_conf:
if __name__ == "__main__":
my_nfs_server = nfs_server_conf(allow_network="*")
my_nfs_server.main_install()
my_nfs_server.main_install()