Skip to content
Snippets Groups Projects
Commit 213a096b authored by Alberto LIVIO BECCARIA's avatar Alberto LIVIO BECCARIA
Browse files

Added new testing branch, this is the initial commit.

parent 9e8ad4e5
No related branches found
No related tags found
No related merge requests found
Showing
with 208 additions and 244 deletions
#!/bin/bash
#/usr/local/sbin/esamesync-esame.sh
# Host for the sync operation
ESAMESYNCHOST=master2.edu-al.unipmn.it
# Configuration override can go to:
. /etc/sysconfig/esamesync-esame
/usr/local/bin/bta-netwait ${ESAMESYNCHOST}
/bin/cat <<MSG
Starting /opt/esame syncronization (if it seems to be stuck, please wait for
a few minutes for your updates to take place; they can require a long time)
DON'T TURN OFF THIS MACHINE NOW, JUST WAIT UNTIL FINISHED
MSG
DST=/opt/esame/
SRC=rsync://${ESAMESYNCHOST}/opt/esame/
cd ${DST}
# To fix spurious errors, we pause and repeat the sync if necessary.
# Note: excluding /opt/google as that is installed locally with RPMs.
# Note: excluding /opt/esame as it is already syncronized on every boot.
#
while ! rsync -avq --sparse --progress --delete ${SRC} . ; do
sleep $(expr $RANDOM % 7200);
done
......@@ -19,41 +19,27 @@ stop() {
}
start() {
echo "START ESAME-GET-CONFIG"
getConfigVars() {
TOKEN_JSON=$(getTokenJSON)
TOKEN=`echo ${TOKEN_JSON} | jsonValue token 1`
MACHINE_NAME=`hostname`
MACHINE_JSON=`/usr/bin/curl -s -k --max-time 10 -H "Authorization: Bearer ${TOKEN}" -X GET ${API_BASE_URL}/machines/name/${MACHINE_NAME}`
MACHINE_ID=`echo $MACHINE_JSON | jsonValue id 1`
MACHINE_CONFIGS_ID=`echo $MACHINE_JSON | jsonValue configs_id 1`
CONFIG_NAME=`echo $MACHINE_JSON | jsonValue name 2`
MACHINE_CONFIGS_ID_PREV=''
if [[ -e /local/config_id ]]
CONFIG_NAME_PREV=''
if [[ -e /local/config_name ]]
then
MACHINE_CONFIGS_ID_PREV=`cat /local/config_id`
fi
echo "TOKEN_JSON: $TOKEN_JSON"
echo "TOKEN: $TOKEN"
echo "MACHINE_NAME: $MACHINE_NAME"
echo "MACHINE_JSON: $MACHINE_JSON"
echo "MACHINE_ID: $MACHINE_ID"
echo "MACHINE_CONFIGS_ID: $MACHINE_CONFIGS_ID"
echo "MACHINE_CONFIGS_ID_PREV: $MACHINE_CONFIGS_ID_PREV"
CONFIG_NAME_PREV=`cat /local/config_name`
# non sono riuscito a contattatare il ws
if [[ "$MACHINE_CONFIGS_ID" == "" ]]
then
echo "Error: WS unreachable or wrong credentials"
exit 1
fi
}
# back config files up
cp -f /local/esame-machine.conf /local/esame-machine.conf.prev 2>&1
cp -f /local/iptables /local/iptables.prev 2>&1
getConfigFile() {
# get configuration file
HTTP_STATUS=`/usr/bin/curl -s -k -w "%{http_code}" -o /local/esame-machine.conf --max-time 10 --header "Authorization: Bearer ${TOKEN}" -X GET ${API_BASE_URL}/machines/${MACHINE_ID}/configfile`
if [[ $HTTP_STATUS -ne 200 ]]
......@@ -63,7 +49,10 @@ start() {
else
echo "Downloaded config file (http_status=$HTTP_STATUS)"
fi
}
getIpConfigFile() {
# get ipconfig file
HTTP_STATUS=`/usr/bin/curl -s -k -w "%{http_code}" -o /local/iptables --max-time 10 --header "Authorization: Bearer ${TOKEN}" -X GET ${API_BASE_URL}/machines/${MACHINE_ID}/ipconfigfile`
if [[ $HTTP_STATUS -ne 200 ]]
......@@ -73,51 +62,107 @@ start() {
else
echo "Downloaded iptables config file (http_status=$HTTP_STATUS)"
fi
}
updateCurrentConfigId() {
# Update this machine's current config id
HTTP_STATUS=`/usr/bin/curl -s -k -w "%{http_code}" -o /dev/null --max-time 10 -H "Content-Type: application/json" -H "Authorization: Bearer ${TOKEN}" \
-X PUT -d "{\"current_configs_id\":\"$MACHINE_CONFIGS_ID\"}" ${API_BASE_URL}/machines/${MACHINE_ID}/currentconfig`
if [[ $HTTP_STATUS -ne 200 ]]
then
echo "Error updating current config (http_status=$HTTP_STATUS)"
exit 1
else
echo "Updated current config (http_status=$HTTP_STATUS)"
fi
}
start() {
echo "START ESAME-GET-CONFIG"
getConfigVars
#echo "TOKEN_JSON: $TOKEN_JSON"
#echo "TOKEN: $TOKEN"
#echo "MACHINE_NAME: $MACHINE_NAME"
#echo "MACHINE_JSON: $MACHINE_JSON"
#echo "MACHINE_ID: $MACHINE_ID"
#echo "MACHINE_CONFIGS_ID: $MACHINE_CONFIGS_ID"
#echo "MACHINE_CONFIGS_ID_PREV: $MACHINE_CONFIGS_ID_PREV"
echo "Configuration: $CONFIG_NAME"
# non sono riuscito a contattare il ws
if [[ "$CONFIG_NAME" == "" ]]
then
echo "Error: WS unreachable or wrong credentials"
exit 1
fi
# back config files up
cp -f /local/esame-machine.conf /local/esame-machine.conf.prev 2>&1
cp -f /local/iptables /local/iptables.prev 2>&1
getConfigFile
getIpConfigFile
# configuration profile is changed
if [[ "$MACHINE_CONFIGS_ID" != "$MACHINE_CONFIGS_ID_PREV" ]]
if [[ "$CONFIG_NAME" != "$CONFIG_NAME_PREV" ]]
then
# stop the timer to avoid executing this script again before the boot
/usr/bin/systemctl stop esame-apply-config.timer
# update config_id file
echo ${MACHINE_CONFIGS_ID} > /local/config_id
#/usr/bin/systemctl stop esame-apply-config.timer
# update config_name file
echo ${CONFIG_NAME} > /local/config_name
# no exam, set normal target
if [[ "$MACHINE_CONFIGS_ID" -eq "0" ]]
if [[ "$CONFIG_NAME" == "normale" ]]
then
# stop some services to revert system files
/usr/bin/systemctl stop esame-kioskmode
/usr/bin/systemctl stop esame-kdm-autologin
/usr/bin/systemctl stop esame-virtualbox
#/usr/bin/systemctl stop esame-kioskmode
#/usr/bin/systemctl stop esame-kdm-autologin
#/usr/bin/systemctl stop esame-virtualbox
rm /local/esame-machine.conf 2>&1
rm /local/esame-machine.conf.prev 2>&1
rm /local/iptables 2>&1
rm /local/iptables.prev 2>&1
echo "Normal!"
/usr/bin/systemctl set-default graphical.target
/usr/bin/systemctl reboot --force
echo "Normal!"
#systemctl isolate graphical && exit 0
#/usr/bin/systemctl set-default graphical.target
/usr/bin/systemctl reboot
#--force
else
echo "Exam!"
/usr/bin/systemctl set-default esame.target
/usr/bin/systemctl reboot --force
#systemctl isolate esame.target && exit 0
#/usr/bin/systemctl set-default esame.target
/usr/bin/systemctl reboot
#--force
fi
else
# Update this machine's current config id
HTTP_STATUS=`/usr/bin/curl -s -k -w "%{http_code}" -o /dev/null --max-time 10 -H "Content-Type: application/json" -H "Authorization: Bearer ${TOKEN}" \
-X PUT -d "{\"current_configs_id\":\"$MACHINE_CONFIGS_ID\"}" ${API_BASE_URL}/machines/${MACHINE_ID}/currentconfig`
if [[ $HTTP_STATUS -ne 200 ]]
# at boot time choose the correct target
if [[ "$1" == "boot" ]]
then
echo "Error updating current config (http_status=$HTTP_STATUS)"
exit 1
else
echo "Updated current config (http_status=$HTTP_STATUS)"
# we have just rebooted, update the current configuration via web service
updateCurrentConfigId
case "$CONFIG_NAME" in
'normale') # normal
systemctl isolate graphical.target && exit 0
;;
'kiosk-dir' | 'kiosk-dir-esami' | 'kiosk-escher' | 'kiosk-freebrowsing' | 'kiosk-teco') # kiosk mode
systemctl isolate esamekiosk.target && exit 0
;;
*) # all full desktop exams
systemctl isolate esame.target && exit 0
;;
esac
fi
fi
# Runtime parameters
if [[ "$MACHINE_CONFIGS_ID" -ne "0" ]]
if [[ "$CONFIG_NAME" != "normale" ]]
then
# check if parameters are changed
cmp --silent /local/esame-machine.conf /local/esame-machine.conf.prev
......@@ -134,7 +179,6 @@ start() {
echo " done."
echo
echo "All done."
exit 0
fi
fi
}
......@@ -143,6 +187,9 @@ start() {
args=("$@")
case "$1" in
'boot')
start "boot"
;;
'start')
start
;;
......@@ -154,7 +201,7 @@ case "$1" in
start
;;
*)
echo "Usage: $0 { start | stop | restart }";
echo "Usage: $0 { boot | start | stop | restart }";
exit 1;
;;
esac
......
#!/bin/bash
stop() {
#/etc/init.d/iptables-esame stop
#/etc/init.d/iptables restart
# se facciamo reboot tutte le volte questo non serve, ma si potrebbe prevedere
#/usr/sbin/iptables-restore </etc/sysconfig/iptables
:
......
#!/bin/bash
clear() {
sed -i '/AutoLoginEnable=/s/.*/#\0/' /etc/kde/kdm/kdmrc
sed -i '/AutoLoginEnable=/s/.*/#\0/' /etc/kde/kdm/kdmrc
sed -i '/AutoLoginAgain=/s/.*/#\0/' /etc/kde/kdm/kdmrc
sed -i '/AutoLoginUser=/s/.*/#\0/' /etc/kde/kdm/kdmrc
}
......
......@@ -16,7 +16,6 @@ start() {
cd /local && mv ${ESAME_USER} "${ESAME_USER}.${TIME}"
chown root:root "${ESAME_USER}.${TIME}"
chmod 700 "${ESAME_USER}.${TIME}"
#cp -a /opt/esame/home/${ESAME_USER} ${ESAME_USER}
cp -a /opt/esame/home/${ESAME_USER} ./
chown -Rh ${ESAME_USER}:esame ${ESAME_USER}
fi
......
#!/bin/bash
# obsolete
stop() {
echo "STOP ESAME-APPLY-CONFIG"
#rm /local/esame-machine.conf
#rm /local/iptables
}
start() {
. /opt/esame/bin/get-config start
echo "START ESAME-APPLY-CONFIG"
# configuration profile is changed
if [[ "$MACHINE_CONFIGS_ID" != "$MACHINE_CONFIGS_ID_PREV" ]]
then
# update config_id file
echo ${MACHINE_CONFIGS_ID} > /local/config_id
# no exam, set normal target
if [[ "$MACHINE_CONFIGS_ID" -eq "0" ]]
then
# stop some services to revert system files
/usr/bin/systemctl stop esame-kioskmode
/usr/bin/systemctl stop esame-kdm-autologin
rm /local/esame-machine.conf 2>&1
rm /local/esame-machine.conf.prev 2>&1
rm /local/iptables 2>&1
rm /local/iptables.prev 2>&1
echo "Normal!"
/usr/bin/systemctl set-default graphical.target
reboot
else
echo "Exam!"
/usr/bin/systemctl set-default esame.target
reboot
fi
fi
if [[ "$MACHINE_CONFIGS_ID" -ne "0" ]]
then
# check if parameters are changed
cmp --silent /local/esame-machine.conf /local/esame-machine.conf.prev
if [[ $? -ne 0 ]]
then
/usr/bin/systemctl daemon-reload
echo "Configuration parameters changed: restart services... "
# restart some exam services
echo -n "USB..."
/usr/bin/systemctl start esame-usb
echo " done."
echo -n "Firefox home..."
/usr/bin/systemctl start esame-firefox-home
echo " done."
echo
echo "All done."
fi
fi
}
args=("$@")
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
*)
echo "Usage: $0 { start | stop | restart }";
exit 1;
;;
esac
exit 0
#!/bin/bash
find_regular_user_sessions() {
ESAME_KILL_USERS=`loginctl list-sessions -l | awk '{print $3}' | egrep -v 'root|labsync|esame|moodle|vbconsole|listed|USER'`
}
find_esame_user_sessions() {
ESAME_KILL_USERS=`loginctl list-sessions -l | awk '{print $3}' | egrep 'esame|moodle|vbconsole'`
}
kill_sessions() {
for a in ${ESAME_KILL_USERS}; do
echo loginctl kill-user "$a"
loginctl kill-user "$a"
done
}
start() {
# We kill user sessions when the exam starts.
find_regular_user_sessions
kill_sessions
}
stop() {
# We kill exam session when the exam ends.
find_esame_user_sessions
kill_sessions
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
*)
echo "Usage: $0 { start | stop | restart }";
exit 1;
;;
esac
exit 0
#!/bin/bash
getconf() {
ESAME_USB=${args[1]}
}
# Un'idea alternativa sarebbe impedire il caricamento del modulo
# usb-storage. Occorre pero' rimuoverlo dai moduli gia' caricati,
# e fare qualcosa nel caso in cui sia impossibile rimuoverlo
......
......@@ -2,20 +2,6 @@
ESAME_VB_CONFIG_FILE="/local/vbconsole/bin/kiosk.settings"
getconf() {
# Get the right config file
# . /opt/esame/bin/getconf
# Source the current exam configuration
# . ${ESAME_CONF}
# Check the syntax of the configuration file
# /opt/esame/bin/esame-check-config.sh || exit 1
ESAME_VIRTUALBOX=${args[1]}
ESAME_USER=${args[2]}
}
stop() {
if [ -f ${ESAME_VB_CONFIG_FILE} ]; then
echo "STOP VIRTUALBOX KIOSK";
......
#!/bin/bash
# esame systemd services and targets installer v2.0
GIT_URL=https://gitlab.di.unipmn.it
GIT_BASE_DIR=ulisse/labmanager-systemd/raw/master/ng
function askYesNo {
QUESTION=$1
......@@ -25,17 +29,24 @@ mkdir -p /usr/libexec/labmanager
# script per i servizi systemd
echo "Downloading systemd script files..."
cd /usr/libexec/labmanager
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/bin/bta-no-usbpen
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/bin/get-config
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/bin/kdm-autologin
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/bin/mk-homedir
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/bin/firefox-home
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/bin/iptables-rules
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/bin/kioskmode
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/bin/nfs
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/bin/usb
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/bin/virtualbox
curl -O $GIT_URL/$GIT_BASE_DIR/bin/bta-no-usbpen
curl -O $GIT_URL/$GIT_BASE_DIR/bin/get-config
curl -O $GIT_URL/$GIT_BASE_DIR/bin/kdm-autologin
curl -O $GIT_URL/$GIT_BASE_DIR/bin/mk-homedi
curl -O $GIT_URL/$GIT_BASE_DIR/bin/firefox-home
curl -O $GIT_URL/$GIT_BASE_DIR/bin/iptables-rules
curl -O $GIT_URL/$GIT_BASE_DIR/bin/kioskmode
curl -O $GIT_URL/$GIT_BASE_DIR/bin/nfs
curl -O $GIT_URL/$GIT_BASE_DIR/bin/usb
curl -O $GIT_URL/$GIT_BASE_DIR/bin/virtualbox
chmod +x *
# script esamesync-esame
cd /usr/local/sbin
curl -O $GIT_URL/$GIT_BASE_DIR/bin/esamesync-esame.sh
chmod +x esamesync-esame.sh
echo "OK."
echo ""
......@@ -43,18 +54,23 @@ echo ""
# servizi systemd
echo "Downloading systemd service files..."
cd /etc/systemd/system
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-apply-config.service
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-apply-config.timer
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-firefox-home.service
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-get-config.service
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-iptables-rules.service
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-kdm-autologin.service
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-kioskmode.service
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-mk-homedir.service
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-nfs.service
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame.target
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-usb.service
curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-systemd/raw/master/systemd/esame-virtualbox.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-get-config-boot.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-get-config.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-get-config.timer
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-firefox-home.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-get-config.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-iptables-rules.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-kdm-autologin.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-kioskmode.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-mk-homedir.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-nfs.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-usb.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-virtualbox.service
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame.target
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esame-configurator.target
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esamesync-esame.target
curl -O $GIT_URL/$GIT_BASE_DIR/systemd/esamekiosk.target
echo "OK."
echo ""
......@@ -66,24 +82,36 @@ if [ "$DOIT" = true ]; then
systemctl disable esame.service
fi
# create symlinks for target esame and esamekiosk
mkdir esame.target.wants
cd esame.target.wants
ln -s /usr/lib/systemd/system/accounts-daemon.service .
ln -s /usr/lib/systemd/system/rtkit-daemon.service .
ln -s /usr/lib/systemd/system/switcheroo-control.service .
ln -s /usr/lib/systemd/system/systemd-update-utmp-runlevel.service .
ln -s /usr/lib/systemd/system/udisks2.service .
mkdir esamekiosk.target.wants
cd esamekiosk.target.wants
ln -s /usr/lib/systemd/system/accounts-daemon.service .
ln -s /usr/lib/systemd/system/rtkit-daemon.service .
ln -s /usr/lib/systemd/system/switcheroo-control.service .
ln -s /usr/lib/systemd/system/systemd-update-utmp-runlevel.service .
ln -s /usr/lib/systemd/system/udisks2.service .
echo -n "Reload systemd"
systemctl daemon-reload
echo -n "Enable systemd services..."
systemctl enable esame-*.service
systemctl enable esame-apply-config.timer
systemctl enable esamesync-esame.service
systemctl enable esame-get-config.timer
echo " OK."
echo ""
# sfondi
#echo "Downloading backgrounds..."
#mkdir -p /opt/backgrounds/lab-linux/2017
#cd /opt/backgrounds/lab-linux/2017
#curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-extras/raw/master/backgrounds/lab-linux/2017/KEEPCALM-esame.png
#curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-extras/raw/master/backgrounds/lab-linux/2017/KEEPCALM-moodle.png
#curl -O https://gitlab.di.unipmn.it/ulisse/labmanager-extras/raw/master/backgrounds/lab-linux/2017/KEEPCALM-show.png
#echo "OK."
echo ""
echo "All done!"
[Unit]
Description=Esame Configurator Target
Requires=basic.target network-online.target sshd.service abrtd.service
#Requires=basic.target dbus.service getty.target systemd-ask-password-wall.path systemd-logind.service systemd-update-utmp-runlevel.service systemd-user-sessions.service NetworkManager.service ModemManager.service abrt-journal-core.service abrt-vmcore.service atd.service auditd.service chronyd.service crond.service cups.path dbxtool.service gpm.service lm_sensors.service mdmonitor.service nfs-client.target remote-fs.target rpcbind.service sshd.service sssd.service rtkit-daemon.service switcheroo-control.service udisks2.service accounts-daemon.service plymouth-quit-wait.service dev-snd-hwC0D2.device
Conflicts=rescue.service rescue.target graphical.target esame.target
After=basic.target rescue.service rescue.target network-online.target sshd.service abrtd.service
#dbus.service getty.target systemd-ask-password-wall.path systemd-logind.service systemd-update-utmp-runlevel.service systemd-user-sessions.service NetworkManager.service ModemManager.service abrt-journal-core.service abrt-vmcore.service atd.service auditd.service chronyd.service crond.service cups.path dbxtool.service gpm.service lm_sensors.service mdmonitor.service nfs-client.target remote-fs.target rpcbind.service sshd.service sssd.service rtkit-daemon.service switcheroo-control.service udisks2.service accounts-daemon.service plymouth-quit-wait.service plymouth-quit.service dev-snd-hwC0D2.device
AllowIsolate=yes
......@@ -12,4 +12,4 @@ ExecStop=/usr/libexec/labmanager/firefox-home stop
ExecReload=/usr/libexec/labmanager/firefox-home restart
[Install]
WantedBy=esame.target
WantedBy=esame.target esamekiosk.target
......@@ -5,5 +5,9 @@ Wants=network-online.target esamesync-esame.service
[Service]
Type=oneshot
RemainAfterExit=yes
TimeoutSec=0
ExecStart=/usr/libexec/labmanager/get-config start
ExecStart=/usr/libexec/labmanager/get-config boot
[Install]
WantedBy=esame-configurator.target
......@@ -5,9 +5,5 @@ Wants=network-online.target esamesync-esame.service
[Service]
Type=oneshot
RemainAfterExit=yes
TimeoutSec=0
ExecStart=/usr/libexec/labmanager/get-config start
[Install]
WantedBy=esame.target
......@@ -4,7 +4,7 @@ Description=Get and apply config files from web service (timer)
[Timer]
OnBootSec=60s
OnUnitActiveSec=60s
#Unit=esame-apply-config.service
#Unit=esame-get-config.service
[Install]
WantedBy=timers.target
WantedBy=esame.target esamekiosk.target graphical.target
......@@ -10,4 +10,4 @@ TimeoutSec=0
ExecStart=/usr/libexec/labmanager/iptables-rules start
[Install]
WantedBy=esame.target
WantedBy=esame.target esamekiosk.target
......@@ -12,4 +12,4 @@ ExecStop=/usr/libexec/labmanager/kdm-autologin stop
ExecReload=/usr/libexec/labmanager/kdm-autologin restart
[Install]
WantedBy=esame.target
WantedBy=esame.target esamekiosk.target
......@@ -12,4 +12,4 @@ ExecStop=/usr/libexec/labmanager/kioskmode stop
ExecReload=/usr/libexec/labmanager/kioskmode restart
[Install]
WantedBy=esame.target
WantedBy=esamekiosk.target
......@@ -10,4 +10,4 @@ EnvironmentFile=-/local/esame-machine.conf
ExecStart=/usr/libexec/labmanager/mk-homedir start
[Install]
WantedBy=esame.target
WantedBy=esame.target esamekiosk.target
......@@ -13,4 +13,4 @@ ExecStart=/usr/libexec/labmanager/nfs start
#ExecReload=/usr/libexec/labmanager/nfs restart
[Install]
WantedBy=esame.target
WantedBy=esame.target esamekiosk.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment