Fix 'daemon' misspelling
This commit is contained in:
@@ -22,7 +22,7 @@ The ideal use case is for a NAS with several hard drives, a low power CPU (ie. A
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Can be started in deamon mode
|
* Can be started in daemon mode
|
||||||
* Can control several fans and/or several drives with a single invocation
|
* Can control several fans and/or several drives with a single invocation
|
||||||
* Can automatically spin down drives after a customizable period of inactivity
|
* Can automatically spin down drives after a customizable period of inactivity
|
||||||
* Can adapt to different fan caracteristics
|
* Can adapt to different fan caracteristics
|
||||||
@@ -140,9 +140,9 @@ Some Hitachi (now HGST) drives support a special way of querying temperature tha
|
|||||||
Level of output to display
|
Level of output to display
|
||||||
-b, --background Daemonize process
|
-b, --background Daemonize process
|
||||||
-l LOG_FILEPATH, --log-file LOG_FILEPATH
|
-l LOG_FILEPATH, --log-file LOG_FILEPATH
|
||||||
Filepath for log output when using deamon mode
|
Filepath for log output when using daemon mode
|
||||||
--pid-file PID_FILEPATH
|
--pid-file PID_FILEPATH
|
||||||
Filepath for lock file when using deamon mode
|
Filepath for lock file when using daemon mode
|
||||||
-t, --test Run some tests and exit
|
-t, --test Run some tests and exit
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -541,12 +541,12 @@ if __name__ == "__main__":
|
|||||||
action="store",
|
action="store",
|
||||||
default=None,
|
default=None,
|
||||||
dest="log_filepath",
|
dest="log_filepath",
|
||||||
help="Filepath for log output when using deamon mode")
|
help="Filepath for log output when using daemon mode")
|
||||||
arg_parser.add_argument("--pid-file",
|
arg_parser.add_argument("--pid-file",
|
||||||
action="store",
|
action="store",
|
||||||
default=None,
|
default=None,
|
||||||
dest="pid_filepath",
|
dest="pid_filepath",
|
||||||
help="Filepath for lock file when using deamon mode")
|
help="Filepath for lock file when using daemon mode")
|
||||||
arg_parser.add_argument("-t",
|
arg_parser.add_argument("-t",
|
||||||
"--test",
|
"--test",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
@@ -583,11 +583,11 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
# main
|
# main
|
||||||
with contextlib.ExitStack() as deamon_context:
|
with contextlib.ExitStack() as daemon_context:
|
||||||
if args.daemonize:
|
if args.daemonize:
|
||||||
preserved_fds = None
|
preserved_fds = None
|
||||||
if args.log_filepath is not None:
|
if args.log_filepath is not None:
|
||||||
log_output = deamon_context.enter_context(open(args.log_filepath, "at+"))
|
log_output = daemon_context.enter_context(open(args.log_filepath, "at+"))
|
||||||
preserved_fds = [log_output.fileno()]
|
preserved_fds = [log_output.fileno()]
|
||||||
else:
|
else:
|
||||||
log_output = None
|
log_output = None
|
||||||
@@ -598,7 +598,7 @@ if __name__ == "__main__":
|
|||||||
exit(1)
|
exit(1)
|
||||||
else:
|
else:
|
||||||
pidfile = None
|
pidfile = None
|
||||||
deamon_context.enter_context(daemon.DaemonContext(stdout=log_output,
|
daemon_context.enter_context(daemon.DaemonContext(stdout=log_output,
|
||||||
stderr=log_output,
|
stderr=log_output,
|
||||||
pidfile=pidfile,
|
pidfile=pidfile,
|
||||||
files_preserve=preserved_fds))
|
files_preserve=preserved_fds))
|
||||||
|
|||||||
Reference in New Issue
Block a user