diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..939db295 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pyc +*.log \ No newline at end of file diff --git a/data/images/restart.png b/data/images/restart.png new file mode 100644 index 00000000..9c95940f Binary files /dev/null and b/data/images/restart.png differ diff --git a/data/images/shutdown.png b/data/images/shutdown.png new file mode 100644 index 00000000..edc2b5d1 Binary files /dev/null and b/data/images/shutdown.png differ diff --git a/templates.py b/templates.py index 17815da9..67c3e66d 100644 --- a/templates.py +++ b/templates.py @@ -23,7 +23,10 @@ _nav = '''''' _footer = ''' diff --git a/webServer.py b/webServer.py index c75ff37d..9b581918 100644 --- a/webServer.py +++ b/webServer.py @@ -434,3 +434,15 @@ class Headphones: sys.exit(0) shutdown.exposed = True + + def restart(self): + logger.log(u"Restarting Headphones.") + restart = True + #answer = raw_input("Do you want to restart this program ? ") + #if answer.strip() in "y Y yes Yes YES".split(): + #restart = True + if restart: + python = sys.executable + os.execl(python, python, * sys.argv) + + restart.exposed = True \ No newline at end of file