p3lib 1.1.94__py3-none-any.whl → 1.1.95__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- p3lib/boot_manager.py +15 -5
- {p3lib-1.1.94.dist-info → p3lib-1.1.95.dist-info}/METADATA +1 -1
- {p3lib-1.1.94.dist-info → p3lib-1.1.95.dist-info}/RECORD +6 -6
- {p3lib-1.1.94.dist-info → p3lib-1.1.95.dist-info}/LICENSE +0 -0
- {p3lib-1.1.94.dist-info → p3lib-1.1.95.dist-info}/WHEEL +0 -0
- {p3lib-1.1.94.dist-info → p3lib-1.1.95.dist-info}/top_level.txt +0 -0
p3lib/boot_manager.py
CHANGED
@@ -27,13 +27,16 @@ class BootManager(object):
|
|
27
27
|
parser.add_argument(BootManager.CHECK_CMD_OPT, help="Check the status of an auto started icons_gw instance.", action="store_true", default=False)
|
28
28
|
|
29
29
|
@staticmethod
|
30
|
-
def HandleOptions(uio, options, enable_syslog):
|
30
|
+
def HandleOptions(uio, options, enable_syslog, appName=None, restartSeconds=1):
|
31
31
|
"""@brief Handle one of the bot manager command line options if the
|
32
32
|
user passed it on the cmd line.
|
33
33
|
@param uio A UIO instance.
|
34
34
|
@param options As returned from parser.parse_args() where parser
|
35
35
|
is an instance of argparse.ArgumentParser.
|
36
36
|
@param enable_syslog True to enable systemd syslog output.
|
37
|
+
@param appName The name of the app. This is used as the service name. If not set then
|
38
|
+
the name of the initially executed python file is used.
|
39
|
+
@param restartSeconds The number of seconds to sleep before restarting a service that has stopped (default=1).
|
37
40
|
@return True if handled , False if not."""
|
38
41
|
handled = False
|
39
42
|
if options.check_auto_start:
|
@@ -41,7 +44,7 @@ class BootManager(object):
|
|
41
44
|
handled = True
|
42
45
|
|
43
46
|
elif options.enable_auto_start:
|
44
|
-
BootManager.EnableAutoStart(uio, enable_syslog)
|
47
|
+
BootManager.EnableAutoStart(uio, enable_syslog, appName, restartSeconds)
|
45
48
|
handled = True
|
46
49
|
|
47
50
|
elif options.disable_auto_start:
|
@@ -51,9 +54,16 @@ class BootManager(object):
|
|
51
54
|
return handled
|
52
55
|
|
53
56
|
@staticmethod
|
54
|
-
def EnableAutoStart(uio, enable_syslog):
|
55
|
-
"""@brief Enable this program to auto start when the computer on which it is installed starts.
|
56
|
-
|
57
|
+
def EnableAutoStart(uio, enable_syslog, appName, restartSeconds):
|
58
|
+
"""@brief Enable this program to auto start when the computer on which it is installed starts.
|
59
|
+
@param uio A UIO instance.
|
60
|
+
@param options As returned from parser.parse_args() where parser
|
61
|
+
is an instance of argparse.ArgumentParser.
|
62
|
+
@param enable_syslog True to enable systemd syslog output.
|
63
|
+
@param appName The name of the app. This is used as the service name. If not set then
|
64
|
+
the name of the initially executed python file is used.
|
65
|
+
@param restartSeconds The number of seconds to sleep before restarting a service that has stopped (default=1)."""
|
66
|
+
bootManager = BootManager(uio=uio, ensureRootUser=True, appName=appName, restartSeconds=restartSeconds)
|
57
67
|
arsString = " ".join(sys.argv)
|
58
68
|
bootManager.add(argString=arsString, enableSyslog=enable_syslog)
|
59
69
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: p3lib
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.95
|
4
4
|
Summary: A group of python modules for networking, plotting data, config storage, automating boot scripts, ssh access and user input output.
|
5
5
|
Home-page: https://github.com/pjaos/p3lib
|
6
6
|
Author: Paul Austen
|
@@ -2,7 +2,7 @@ p3lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
p3lib/ate.py,sha256=_BiqMUYNAlp4O8MkP_PAUe62Bzd8dzV4Ipv62OFS6Ok,4759
|
3
3
|
p3lib/bokeh_auth.py,sha256=zi_Hty2WkCJVNQ4sINNRo5FBXujuJky9phyoF6M55ms,15180
|
4
4
|
p3lib/bokeh_gui.py,sha256=55sajP_x9O1lE0uP3w3-T5f2oMzk7jSolLqxlEdLeLg,40245
|
5
|
-
p3lib/boot_manager.py,sha256=
|
5
|
+
p3lib/boot_manager.py,sha256=h8IOvhQA8z-4S3smNHGYII55m5bzmQjcmzfPEJedxb8,18921
|
6
6
|
p3lib/conduit.py,sha256=jPkjdtyCx2I6SFqcEo8y2g7rgnZ-jNY7oCuYIETzT5Q,6046
|
7
7
|
p3lib/database_if.py,sha256=XKu1w3zftGbj4Rh54wrWJnoCtqHkhCzJUPN2S70XIKg,11915
|
8
8
|
p3lib/helper.py,sha256=xTKPgpziwr4zyaoc0sjZRFr0M91fo7Tok_nSAvtiTZE,12020
|
@@ -15,8 +15,8 @@ p3lib/pconfig.py,sha256=82rX7zvJVbSFtYYHvhj9I6GTdpjf9v73fNs9WQE-5ik,35388
|
|
15
15
|
p3lib/ssh.py,sha256=OyoAQ_h1L2RfkjTAChDrvLFfl4Fe_gBNdX5rvK-wKiw,42125
|
16
16
|
p3lib/table_plot.py,sha256=RPncwVlGUkkx5Fw0dHQedXo0TSPlTi__VrJBDzaMsuI,32116
|
17
17
|
p3lib/uio.py,sha256=Aaxc99XiE3d2f9vLjaN-bZsckoNxay5t0ujdK6PXGrw,23265
|
18
|
-
p3lib-1.1.
|
19
|
-
p3lib-1.1.
|
20
|
-
p3lib-1.1.
|
21
|
-
p3lib-1.1.
|
22
|
-
p3lib-1.1.
|
18
|
+
p3lib-1.1.95.dist-info/LICENSE,sha256=igqTy5u0kVWM1n-NUZMvAlinY6lVjAXKoag0okkS8V8,1067
|
19
|
+
p3lib-1.1.95.dist-info/METADATA,sha256=jbNsDi4Z4iilqPmYlfxw82s4Xz2gKTytMiCobh7m6Pw,918
|
20
|
+
p3lib-1.1.95.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
21
|
+
p3lib-1.1.95.dist-info/top_level.txt,sha256=SDCpXYh-19yCFp4Z8ZK4B-3J4NvTCJElZ42NPgcR6-U,6
|
22
|
+
p3lib-1.1.95.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|