diff options
| author | alex <alex@pdp7.net> | 2023-10-28 09:40:25 +0000 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2023-10-28 09:40:25 +0000 |
| commit | 382f7da7157b5b5f845771965fd547c2aeafba93 (patch) | |
| tree | 6f2529e55da95e596186a31cf1e7a7f25c2b2a58 /scripts | |
| parent | 97b87be8964688365468f548a32e385ac3bd56bb (diff) | |
Add bitlbee setup
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/p7s/bitlbee.py | 31 | ||||
| -rw-r--r-- | scripts/pyproject.toml | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/scripts/p7s/bitlbee.py b/scripts/p7s/bitlbee.py new file mode 100644 index 00000000..4f0acbd4 --- /dev/null +++ b/scripts/p7s/bitlbee.py @@ -0,0 +1,31 @@ +import pathlib +import textwrap + + +def setup_bitlbee(): + home = pathlib.Path.home() + config = home / ".config" / "containers" / "systemd" + config.mkdir(parents=True, exist_ok=True) + (config / "bitlbee.container").write_text(textwrap.dedent(""" + [Unit] + Description=IM-IRC bridge + + [Container] + Image=quay.io/alexpdp7/workstation:latest + Volume=/home/alex/.local/lib/bitlbee:/var/lib/bitlbee/ + # running this on an LXC container, which borks SecurityLabelDisable + #SecurityLabelDisable=true + PublishPort=6668:6667 + + Exec=bitlbee -Fnv + + [Service] + # Extend Timeout to allow time to pull the image + TimeoutStartSec=900 + + [Install] + # Start by default on boot + WantedBy=multi-user.target default.target + """).lstrip()) + + (home / ".local" / "lib" / "bitlbee").mkdir(parents=True, exist_ok=True) diff --git a/scripts/pyproject.toml b/scripts/pyproject.toml index 51aa351f..27e545f9 100644 --- a/scripts/pyproject.toml +++ b/scripts/pyproject.toml @@ -22,3 +22,4 @@ db-create = 'p7s.distrobox:create' db-enter = 'p7s.distrobox:enter' nextcloud_setup = 'p7s.nextcloud:setup_nextcloud' soju_setup = 'p7s.soju:setup_soju' +bitlbee_setup = 'p7s.bitlbee:setup_bitlbee' |
