mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Reset/V4L2/Systemd/rpi_ws281x/Profiler (#820)
This commit is contained in:
@@ -192,6 +192,7 @@ int main(int argc, char** argv)
|
||||
BooleanOption & versionOption = parser.add<BooleanOption> (0x0, "version", "Show version information");
|
||||
Option & userDataOption = parser.add<Option> ('u', "userdata", "Overwrite user data path, defaults to home directory of current user (%1)", QDir::homePath() + "/.hyperion");
|
||||
BooleanOption & resetPassword = parser.add<BooleanOption> (0x0, "resetPassword", "Lost your password? Reset it with this option back to 'hyperion'");
|
||||
BooleanOption & deleteDB = parser.add<BooleanOption> (0x0, "deleteDatabase", "Start all over? This Option will delete the database");
|
||||
BooleanOption & silentOption = parser.add<BooleanOption> ('s', "silent", "do not print any outputs");
|
||||
BooleanOption & verboseOption = parser.add<BooleanOption> ('v', "verbose", "Increase verbosity");
|
||||
BooleanOption & debugOption = parser.add<BooleanOption> ('d', "debug", "Show debug messages");
|
||||
@@ -300,6 +301,20 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
// delete database before start
|
||||
if(parser.isSet(deleteDB))
|
||||
{
|
||||
QString dbFile = mDir.absolutePath() + "/db/hyperion.db";
|
||||
if (QFile::exists(dbFile))
|
||||
{
|
||||
if (!QFile::remove(dbFile))
|
||||
{
|
||||
Info(log,"Failed to delete Database!");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HyperionDaemon* hyperiond = nullptr;
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user