original_docstring: Set all necessarie files to /etc/ovpn 
docstring: Set all necessarie files to /etc/ovpn
docstring_tokens: Set all necessarie files to / etc / ovpn
code: def conf_ovpn_server():
      """Set all necessarie files to /etc/ovpn """
      crt_folder = app.config['CRT_CERTS_PATH']
      pki_path = app.config['PKI_PATH']
      ovpn_path = app.config['OPENVPN']
      if not os.path.isfile(f'{crt_folder}/ca.crt'):
          print('ca.crt not found, please create it')
          return
      if not os.path.isfile(f'{crt_folder}/server.crt'):
          print('server.crt not found, please create it')
          return
      if not os.path.isfile(f'{pki_path}/dh.pem'):
          print('dh.pem not found, please create it')
          return
      if not os.path.isfile(f'{pki_path}/private/server.key'):
          print('server.key not found, please create it')
          return
      print(f'copying ca.crt, server.crt, dh.pem and server.key to {ovpn_path}')
      copy2(f'{crt_folder}/ca.crt', ovpn_path)
      copy2(f'{crt_folder}/server.crt', ovpn_path)
      copy2(f'{pki_path}/dh.pem', ovpn_path)
      copy2(f'{pki_path}/private/server.key', ovpn_path)
code_tokens: def conf_ovpn_server ( ) : crt_folder = app . config [ 'CRT_CERTS_PATH' ] pki_path = app . config [ 'PKI_PATH' ] ovpn_path = app . config [ 'OPENVPN' ] if not os . path . isfile ( f'{crt_folder}/ca.crt' ) : print ( 'ca.crt not found, please create it' ) return if not os . path . isfile ( f'{crt_folder}/server.crt' ) : print ( 'server.crt not found, please create it' ) return if not os . path . isfile ( f'{pki_path}/dh.pem' ) : print ( 'dh.pem not found, please create it' ) return if not os . path . isfile ( f'{pki_path}/private/server.key' ) : print ( 'server.key not found, please create it' ) return print ( f'copying ca.crt, server.crt, dh.pem and server.key to {ovpn_path}' ) copy2 ( f'{crt_folder}/ca.crt' , ovpn_path ) copy2 ( f'{crt_folder}/server.crt' , ovpn_path ) copy2 ( f'{pki_path}/dh.pem' , ovpn_path ) copy2 ( f'{pki_path}/private/server.key' , ovpn_path )
short_docstring: Set all necessarie files to /etc/ovpn
short_docstring_tokens: Set all necessarie files to / etc / ovpn
comment: """Set all necessarie files to /etc/ovpn """