mirror of
https://github.com/k4yt3x/wg-meshconf.git
synced 2025-02-18 02:00:50 +01:00
1.1.3 added warning before flushing config, etc.
This commit is contained in:
parent
9a2814893d
commit
0b20fd4356
@ -19,7 +19,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
VERSION = '1.1.2'
|
VERSION = '1.1.3'
|
||||||
COMMANDS = [
|
COMMANDS = [
|
||||||
'Interactive',
|
'Interactive',
|
||||||
'ShowPeers',
|
'ShowPeers',
|
||||||
@ -178,6 +178,14 @@ class ProfileManager(object):
|
|||||||
def new_profile(self):
|
def new_profile(self):
|
||||||
""" Create new profile and flush the peers list
|
""" Create new profile and flush the peers list
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Warn the user before flushing configurations
|
||||||
|
avalon.warning('This will flush the currently loaded profile!')
|
||||||
|
if len(self.peers) != 0:
|
||||||
|
if not avalon.ask('Continue?', False):
|
||||||
|
return
|
||||||
|
|
||||||
|
# Reset self.peers and start enrolling new peer data
|
||||||
self.peers = []
|
self.peers = []
|
||||||
get_peers_settings()
|
get_peers_settings()
|
||||||
|
|
||||||
@ -339,13 +347,13 @@ def print_help():
|
|||||||
"""
|
"""
|
||||||
help_lines = [
|
help_lines = [
|
||||||
'\n{}Commands are not case-sensitive{}'.format(avalon.FM.BD, avalon.FM.RST),
|
'\n{}Commands are not case-sensitive{}'.format(avalon.FM.BD, avalon.FM.RST),
|
||||||
'Interactive',
|
'Interactive // launch interactive shell',
|
||||||
'ShowPeers',
|
'ShowPeers // show all peer information',
|
||||||
'LoadProfile [profile path]',
|
'LoadProfile [profile path] // load profile from profile_path',
|
||||||
'SaveProfile [profile path]',
|
'SaveProfile [profile path] // save profile to profile_path',
|
||||||
'NewProfile',
|
'NewProfile // create new profile',
|
||||||
'AddPeers',
|
'AddPeers // add new peers into the current profile',
|
||||||
'GenerateConfigs [output directory]',
|
'GenerateConfigs [output directory] // generate configuration files',
|
||||||
'Exit',
|
'Exit',
|
||||||
'Quit',
|
'Quit',
|
||||||
'',
|
'',
|
||||||
|
Loading…
Reference in New Issue
Block a user