p3lib 1.1.77__py3-none-any.whl → 1.1.79__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 +10 -9
- {p3lib-1.1.77.dist-info → p3lib-1.1.79.dist-info}/METADATA +1 -1
- {p3lib-1.1.77.dist-info → p3lib-1.1.79.dist-info}/RECORD +6 -6
- {p3lib-1.1.77.dist-info → p3lib-1.1.79.dist-info}/LICENSE +0 -0
- {p3lib-1.1.77.dist-info → p3lib-1.1.79.dist-info}/WHEEL +0 -0
- {p3lib-1.1.77.dist-info → p3lib-1.1.79.dist-info}/top_level.txt +0 -0
p3lib/boot_manager.py
CHANGED
@@ -15,18 +15,15 @@ class BootManager(object):
|
|
15
15
|
|
16
16
|
LINUX_OS_NAME = "Linux"
|
17
17
|
|
18
|
-
def __init__(self, uio=None, allowRootUser=
|
18
|
+
def __init__(self, uio=None, allowRootUser=True):
|
19
19
|
"""@brief Constructor
|
20
20
|
@param uio A UIO instance to display user output. If unset then no output
|
21
21
|
is displayed to user.
|
22
22
|
@param allowRootUser If True then allow root user to to auto start
|
23
|
-
programs.
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
be present in the /root folder and so when the program is started
|
28
|
-
it's config will not be found. If a program stores no config in
|
29
|
-
the home folder then this is not an issue."""
|
23
|
+
programs. Note that as the BootManager is responsible for
|
24
|
+
ensuring programs are started up when a machine boots up
|
25
|
+
the installed program should be installed for the root
|
26
|
+
user on Linux systems."""
|
30
27
|
self._uio = uio
|
31
28
|
self._allowRootUser=allowRootUser
|
32
29
|
self._osName = platform.system()
|
@@ -255,6 +252,9 @@ class LinuxBootManager(object):
|
|
255
252
|
If set to None then the current user is used.
|
256
253
|
@param argString The argument string that the program is to be launched with.
|
257
254
|
@param enableSyslog If True enable stdout and stderr to be sent to syslog."""
|
255
|
+
if user is None:
|
256
|
+
user = self._username
|
257
|
+
|
258
258
|
appName, absApp = self._getApp()
|
259
259
|
|
260
260
|
serviceFile = self._getServiceFile(appName)
|
@@ -274,7 +274,8 @@ class LinuxBootManager(object):
|
|
274
274
|
else:
|
275
275
|
lines.append("StandardOutput=null")
|
276
276
|
lines.append("StandardError=journal")
|
277
|
-
|
277
|
+
if self._rootMode and user != 'root':
|
278
|
+
lines.append("User={}".format(user))
|
278
279
|
|
279
280
|
#We add the home path env var so that config files (if stored in/under
|
280
281
|
# the users home dir) can be found by the prgram.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: p3lib
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.79
|
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=XqdCLOalHL3dkyrMPqQoVQBSziVnqlfjB9YAWhZUd_U,14769
|
4
4
|
p3lib/bokeh_gui.py,sha256=55sajP_x9O1lE0uP3w3-T5f2oMzk7jSolLqxlEdLeLg,40245
|
5
|
-
p3lib/boot_manager.py,sha256=
|
5
|
+
p3lib/boot_manager.py,sha256=bmhRPcOjXKgLRzKIrQiNpnun25IBTYMfVP_0hLHgIBc,14574
|
6
6
|
p3lib/conduit.py,sha256=jPkjdtyCx2I6SFqcEo8y2g7rgnZ-jNY7oCuYIETzT5Q,6046
|
7
7
|
p3lib/database_if.py,sha256=XKu1w3zftGbj4Rh54wrWJnoCtqHkhCzJUPN2S70XIKg,11915
|
8
8
|
p3lib/helper.py,sha256=-B63_ncfchMwXrvyVcnj9sxwGnMJ3ASmLmpoYa4tBmM,11862
|
@@ -15,8 +15,8 @@ p3lib/pconfig.py,sha256=_ri9w3aauHXZp8u2YLYHBVroFR_iCqaTCwj_MRa3rHo,30153
|
|
15
15
|
p3lib/ssh.py,sha256=klqQ9YuqU8GwPVPHrAJeEs5PI5hgoYiXflq2kIGG3as,39509
|
16
16
|
p3lib/table_plot.py,sha256=dRPZ9rFpwE9Dpyqrvbm5t2spVaPSHrx_B7KvfWVND3g,32166
|
17
17
|
p3lib/uio.py,sha256=hMarPnYXnqVF23HUIeDfzREo7TMdBjrupXMY_ffuCbI,23133
|
18
|
-
p3lib-1.1.
|
19
|
-
p3lib-1.1.
|
20
|
-
p3lib-1.1.
|
21
|
-
p3lib-1.1.
|
22
|
-
p3lib-1.1.
|
18
|
+
p3lib-1.1.79.dist-info/LICENSE,sha256=igqTy5u0kVWM1n-NUZMvAlinY6lVjAXKoag0okkS8V8,1067
|
19
|
+
p3lib-1.1.79.dist-info/METADATA,sha256=6XmuAsUxf0zQHi9e-9QVlbB8hme5pmDtosaJTALO7tc,918
|
20
|
+
p3lib-1.1.79.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
21
|
+
p3lib-1.1.79.dist-info/top_level.txt,sha256=SDCpXYh-19yCFp4Z8ZK4B-3J4NvTCJElZ42NPgcR6-U,6
|
22
|
+
p3lib-1.1.79.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|