Newer
Older
# esame systemd services and targets installer v2.0
GIT_URL=https://gitlab.di.unipmn.it
GIT_BASE_DIR=ulisse/labmanager-systemd/raw/testing
mkdir -p /usr/libexec/labmanager
# script per i servizi systemd
echo "Downloading systemd script files..."
cd /usr/libexec/labmanager
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
# script esamesync-esame
cd /usr/local/sbin
curl -O $GIT_URL/$GIT_BASE_DIR/bin/esamesync-esame.sh
chmod +x esamesync-esame.sh
# servizi systemd
echo "Downloading systemd service files..."
cd /etc/systemd/system
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

Alberto LIVIO BECCARIA
committed
# following links should be not needed, specifying services as "Wants" directives should suffice

Alberto LIVIO BECCARIA
committed
# 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

Alberto LIVIO BECCARIA
committed
echo -n "Set systemd services..."
systemctl enable esame-*.service
systemctl enable esamesync-esame.service
systemctl enable esame-get-config.timer

Alberto LIVIO BECCARIA
committed
systemctl disable esame-usb.service

Alberto LIVIO BECCARIA
committed
echo " OK."
echo -n "Change default target..."
systemctl set-default esame-configurator.target
echo "OK."