Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
labmanager-systemd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto LIVIO BECCARIA
labmanager-systemd
Commits
e46bd05b
Commit
e46bd05b
authored
6 years ago
by
Alberto LIVIO BECCARIA
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.di.unipmn.it:ulisse/labmanager-systemd
parents
f3fde497
a4d4bac8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install-labmanager.sh
+35
-0
35 additions, 0 deletions
install-labmanager.sh
with
35 additions
and
0 deletions
install-labmanager.sh
+
35
−
0
View file @
e46bd05b
...
...
@@ -4,6 +4,8 @@ GIT_URL=https://gitlab.di.unipmn.it
GIT_BASE_DIR
=
ulisse/labmanager-systemd/raw
GIT_BRANCH
=
master
ESAME_DIR
=
/opt/esame
BIN_FILES
=(
"desktop-wallpaper"
"esamesync-esame.sh"
"firefox-home"
"get-config"
"iptables-rules"
"kdm-autologin"
"kioskmode"
"mk-homedir"
"nfs"
"usb"
"virtualbox"
)
SYSTEMD_FILES
=(
"esame-desktop-wallpaper.service"
"esame-firefox-home.service"
"esame-get-config-boot.service"
"esame-get-config.service"
"esame-iptables-rules.service"
"esame-kdm-autologin.service"
"esame-kioskmode.service"
"esame-mk-homedir.service"
"esame-nfs.service"
"esame-usb.service"
"esame-virtualbox.service"
"esamesync-esame.service"
"esame-get-config.timer"
"esame-configurator.target"
"esame.target"
"esamekiosk.target"
)
...
...
@@ -34,6 +36,29 @@ OLD_FILES=(
# DON'T TOUCH UNDER THIS LINE! #################################################
# Create a users
myuseradd
()
{
if
[
"z
$1
"
==
"z"
]
;
then
echo
"myuseradd: No user specified! Nothing to do."
return
fi
R_USER
=
"
$1
"
R_UID
=
""
if
[
"z
$2
"
!=
"z"
]
;
then
R_UID
=
"-u
$2
"
fi
R_GID
=
"-U"
if
[
"z
$3
"
!=
"z"
]
;
then
# We need to create the group before creating the user
R_GID
=
"-g
$3
"
groupadd
${
R_GID
}
-r
${
R_USER
}
fi
useradd
-b
/local
-m
${
R_UID
}
${
R_GID
}
-r
${
R_USER
}
if
[
$?
-ne
0
]
;
then
echo
"Error creating user
${
R_USER
}
"
fi
}
function
removeFiles
{
local
files
=(
"
$@
"
)
...
...
@@ -89,6 +114,16 @@ removeFiles ${OLD_FILES[@]}
echo
echo
# Create all 'esame' users, with homes under '/local'
mkdir
-p
/local
mkdir
-p
${
ESAME_DIR
}
#useradd -b /local -m -u 968 -U -g 968 -r esamesync
myuseradd esamesync 451 451
myuseradd esame
myuseradd moodle
myuseradd rdesktop
mkdir
-p
/usr/libexec/labmanager
# script per i servizi systemd
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment