Skip to content

Commit

Permalink
v0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean28518 committed Mar 1, 2024
1 parent 28f51f4 commit 00dc36e
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deb/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: linux-arbeitsplatz
Version: 0.4.2
Version: 0.4.3
Depends: libldap2-dev, python3-venv, libsasl2-dev, caddy, gcc, python3-dev, borgbackup, python-llfuse | python3-llfuse, rsync
Maintainer: Jean28518
Architecture: all
Expand Down
12 changes: 12 additions & 0 deletions docs/modules/addons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The .zip file should be named [NAME].zip, where [NAME] is the name of the addon
- setup_[NAME].sh
- update_[NAME].sh
- remove_[NAME].sh
- update_env.sh (optional)
- [NAME].png / [NAME].svg / [NAME].jpg / [NAME].webp
- LICENSE
- any other files needed for the installation of the addon (optional)
Expand Down Expand Up @@ -189,6 +190,17 @@ An example of remove_nocodb.sh would be:
systemctl restart caddy
update_env.sh
-------------

This file is a simple shell script which is executed when the administrator updates the environment of the system configuration,
which could be the master password (also changes the LDAP administrator password) or the IP address of the server, under which it is accessible.
If your addon doesn't rely on the IP address or the master password, you can ignore this file. It is then not necessary to have it.

In our example of nocodb we don't need this file, because we don't rely on the IP address or the master password.
So we don't even have to create this file.


General Tips
============

Expand Down
8 changes: 8 additions & 0 deletions docs/modules/libre-workspace-portal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ The configuration and the control of the services is available via the web inter
All taks are handled by the background service ``linux-arbeitsplatz-unix``. It listens to simple control files in ``/usr/share/linux-arbeitsplatz-central/unix/unix_scripts``.
All actions are configured and done via simple bash scripts with environment variables. So these files can be adjusted easily and are easy to understand and to run manually.

If you want to run a script manually make sure you source the env.sh and unix.conf file in the unix_scripts directory before:

.. code-block:: bash
. /usr/share/linux-arbeitsplatz-central/unix/unix_scripts/env.sh
. /usr/share/linux-arbeitsplatz-central/unix/unix_scripts/unix.conf
welcome
-------

Expand Down
12 changes: 11 additions & 1 deletion docs/setup/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,14 @@ If you are using caddy, replace the two last caddy blocks in the caddyfile e.g.
If you are using another webserver/reverse proxy you have to configure it yourself. The management portal listens via http on port 11123.

It is mandatory to configure the cfg file at /usr/share/linux-arbeitsplatz/cfg. If you want to use the active directory functionality you have to care about yourself about the installation of this. The LDAP configuration is done in the cfg file.
By default, ldap is disabled. Your default login at the web interface is "Administrator" with the password "LibreWorkspace". More details can be found in the cfg file.
By default, ldap is disabled. Your default login at the web interface is "Administrator" with the password "LibreWorkspace". More details can be found in the cfg file.


You also have to ensure /usr/share/linux-arbeitsplatz/unix/unix_scripts/env.sh which is used for the addon and module handling.
The following variables are mandatory to be set. An example would be:

.. code-block:: bash
export IP="1.2.3.4"
export ADMIN_PASSWORD="AdminPasswordOfTheLDAPDomainOtherwiseSetItToAnEmptyString"
export DOMAIN="int.de"
6 changes: 6 additions & 0 deletions src/lac/unix/unix_scripts/unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,12 @@ def change_ip(ip):
if module["installed"]:
subprocess.Popen(["/usr/bin/bash", "update_env.sh"], cwd=module["scriptsFolder"] + "/", env=env).wait()

# Change all old ips with the new ip in /etc/caddy/Caddyfile
os.system(f"sed -i 's/{old_ip}/{ip}/g' /etc/caddy/Caddyfile")

# Change all old ips with the new ip in /usr/share/linux-arbeitsplatz/welcome/templates/welcome/access_rendered.html
os.system(f"sed -i 's/{old_ip}/{ip}/g' /usr/share/linux-arbeitsplatz/welcome/templates/welcome/access_rendered.html")

# Restart the whole server to ensure that the new IP is used everywhere.
reboot_system()

Expand Down

0 comments on commit 00dc36e

Please sign in to comment.