mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-22 10:01:45 +00:00
- It is just a support script and not part of the main source. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
17 lines
550 B
Python
Executable File
17 lines
550 B
Python
Executable File
#!/usr/bin/python3
|
|
# -*- mode: python -*-
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""Set required permissions for user "plinth" to run plinth in dev setup."""
|
|
|
|
import pathlib
|
|
|
|
content = '''
|
|
Cmnd_Alias FREEDOMBOX_ACTION_DEV = /usr/share/plinth/actions/actions, /freedombox/actions/actions
|
|
Defaults!FREEDOMBOX_ACTION_DEV closefrom_override
|
|
plinth ALL=(ALL:ALL) NOPASSWD:SETENV : FREEDOMBOX_ACTION_DEV
|
|
fbx ALL=(ALL:ALL) NOPASSWD : ALL
|
|
'''
|
|
|
|
sudoers_file = pathlib.Path('/etc/sudoers.d/01-freedombox-development')
|
|
sudoers_file.write_text(content)
|