mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
action_utils: Introduce utility for setting debconf answers
Tests: mldonkey - Installs - /etc/default/mldonkey-server has LAUNCH_AT_STARTUP=true - systemctl status mldonkey-server shows daemon running ejabberd - Installs - /etc/ejabberd/ejabberd.yml has domainname properly configured privoxy - Installs - /etc/privoxy/config has listen-address set to '[::]:8118' roundcube - Installs and works - /etc/roundcube/debian-db.php contains dbtype sqlite3 ttrss - Installs and works - /etc/ttrss/database.php has dbtype 'pgsql'. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
12cf790dcd
commit
ca8ea9427c
7 files changed
+34
-35
No files matched your search
+4
-6
@@ -15,13 +15,13 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
"""
|
||||
Configuration helper for Privoxy server.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
|
||||
from plinth import action_utils
|
||||
|
||||
|
||||
def parse_arguments():
|
||||
@@ -39,10 +39,8 @@ def parse_arguments():
|
||||
|
||||
def subcommand_pre_install(_):
|
||||
"""Preseed debconf values before packages are installed."""
|
||||
subprocess.run(
|
||||
['debconf-set-selections'],
|
||||
input=b'privoxy privoxy/listen-address string [::]:8118',
|
||||
check=True)
|
||||
action_utils.debconf_set_selections(
|
||||
['privoxy privoxy/listen-address string [::]:8118'])
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in new issue
Block a user