Verified Commit 2f31a9dd authored by Marco Marinello's avatar Marco Marinello
Browse files

First part of the veyon implementation

parent 44de6848
Pipeline #247 passed with stage
in 51 seconds
......@@ -3,6 +3,9 @@
# Copyright (C) 2016-2017 Progetto Fuss <info@fuss.bz.it>
# Elena Grandi <elena@truelite.it>,
# Christopher R. Gabriel <cgabriel@truelite.it>
# Copyright (C) 2017-2021 The FUSS Project <info@fuss.bz.it>
# Copyright (C) 2021-2022 The FUSS Project <info@fuss.bz.it>
# Author: Marco Marinello <contact-nohuman@marinello.bz.it>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -32,6 +35,7 @@
- users
- cluster
- unattended-apt
- veyon
- misc
- role: unofficial
when: unofficial is defined and unofficial
......
......@@ -3,6 +3,9 @@
# Copyright (C) 2016-2017 Progetto Fuss <info@fuss.bz.it>
# Elena Grandi <elena@truelite.it>,
# Christopher R. Gabriel <cgabriel@truelite.it>
# Copyright (C) 2017-2021 The FUSS Project <info@fuss.bz.it>
# Copyright (C) 2021-2022 The FUSS Project <info@fuss.bz.it>
# Author: Marco Marinello <contact-nohuman@marinello.bz.it>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......
#!/bin/bash
# This file is part of the FUSS Client Veyon integration.
# Copyright (C) 2019-2021 The FUSS Project <info@fuss.bz.it>
# Author: Claudio Cavalli <ccavalli-nohuman@fuss.bz.it>
# Copyright (C) 2022 The FUSS Project <info@fuss.bz.it>
# Author: Marco Marinello <contact-nohuman@marinello.bz.it>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# This file is recovered by a daemon from the FUSS Server, if it
# doesn't exists, will default as below.
if [ -e /var/lib/fuss-client/veyon-excluded-groups ]; then
EXCLUDED_GROUPS="$(xargs < /var/lib/fuss-client/veyon-excluded-groups)"
else
EXCLUDED_GROUPS="docenti insegnanti"
fi
# We don't want teachers to be monitored.
# Gather the groups the users just logged in belongs to.
# NB: The spaces are used for a more reliable detection
BELONGING_GROUPS=" $(id -nG $USER) "
for group in $EXCLUDED_GROUPS; do
if echo "$BELONGING_GROUPS" | grep " $group "; then
exit 0
fi
done
# Stop system-wide Veyon daemon
systemctl stop veyon-service
# Launch Veyon daemon in background as the
# user that logged-in.
su -c veyon-service $USER &
#!/bin/bash
# This file is part of the FUSS Client Veyon integration.
# Copyright (C) 2019-2021 The FUSS Project <info@fuss.bz.it>
# Author: Claudio Cavalli <ccavalli-nohuman@fuss.bz.it>
# Copyright (C) 2022 The FUSS Project <info@fuss.bz.it>
# Author: Marco Marinello <contact-nohuman@marinello.bz.it>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Kill only the processes of that user
# (pkill preferred to killall for his flexibility)
pkill -u $USER veyon
# Restart system-wide daemon
systemctl restart veyon-service
# This file is part of the FUSS Client Veyon integration.
# Copyright (C) 2019-2021 The FUSS Project <info@fuss.bz.it>
# Author: Claudio Cavalli <ccavalli-nohuman@fuss.bz.it>
# Copyright (C) 2022 The FUSS Project <info@fuss.bz.it>
# Author: Marco Marinello <contact-nohuman@marinello.bz.it>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
---
- name: Install veyon
apt:
name:
- veyon-master
- veyon-ctl
- veyon-service
state: latest
# We generally don't want the configuration to be edited,
# so we avoid veyon-configurator to be installed through reccommends
install_recommends: no
- name: Install specific session setup script
copy:
src: "veyonStart"
dest: "/etc/fuss-client/session-setup-script/veyonStart"
owner: "root"
group: "root"
mode: "0755"
- name: Install specific session cleanup script
copy:
src: "veyonStop"
dest: "/etc/fuss-client/session-cleanup-script/veyonStop"
owner: "root"
group: "root"
mode: "0755"
- name: Set some standard variables for veyon
shell: "veyon-ctl config set '{{ item.name }}' '{{ item.value }}'"
loop:
- name: "AccessControl/AccessRestrictedToUserGroups"
value: "true"
- name: "AccessControl/AuthorizedUserGroups"
value: "veyon-master"
- name: "Features/DisabledFeatures"
value: "{f483c659-b5e7-4dbc-bd91-2c9403e70ebd}"
# No daemon restart or activation here:
# we would cause a problem if upgraded un-interactively.
# Also, if the sysadmin wants to disable it, should be fine.
......@@ -3,6 +3,9 @@
# Copyright (C) 2016-2017 Progetto Fuss <info@fuss.bz.it>
# Elena Grandi <elena@truelite.it>,
# Christopher R. Gabriel <cgabriel@truelite.it>
# Copyright (C) 2017-2021 The FUSS Project <info@fuss.bz.it>
# Copyright (C) 2021-2022 The FUSS Project <info@fuss.bz.it>
# Author: Marco Marinello <contact-nohuman@marinello.bz.it>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -32,6 +35,7 @@
- users
- cluster
- unattended-apt
- veyon
- misc
- role: unofficial
when: unofficial is defined and unofficial
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment