mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Don't use tee to write service unit files
We are running as root now directly, no need to tee
This commit is contained in:
@@ -23,10 +23,8 @@ def install_unit(name, unit, path='/etc/systemd/system'):
|
||||
"""
|
||||
Install unit wih given name
|
||||
"""
|
||||
subprocess.run([
|
||||
'tee',
|
||||
os.path.join(path, name)
|
||||
], input=unit.encode('utf-8'), check=True)
|
||||
with open(os.path.join(path, name), 'w') as f:
|
||||
f.write(unit)
|
||||
|
||||
|
||||
def uninstall_unit(name, path='/etc/systemd/system'):
|
||||
|
||||
Reference in New Issue
Block a user