diff options
author | Christian Rößler | 2014-06-30 18:39:56 +0200 |
---|---|---|
committer | Christian Rößler | 2014-06-30 18:39:56 +0200 |
commit | 088fd8ff43b2463ea93fa26a37806ae734c592fa (patch) | |
tree | dcd697794170e76dd6e6cc5f810cb8905063adbb /satellit_installer/satellit_installer | |
parent | [SSPS] Renaming of includes (.inc extension obligatory) (diff) | |
download | setup-scripts-088fd8ff43b2463ea93fa26a37806ae734c592fa.tar.gz setup-scripts-088fd8ff43b2463ea93fa26a37806ae734c592fa.tar.xz setup-scripts-088fd8ff43b2463ea93fa26a37806ae734c592fa.zip |
[SSPS] Some more bigfixes; better output, better checks for dhclient/pump.
Diffstat (limited to 'satellit_installer/satellit_installer')
-rwxr-xr-x | satellit_installer/satellit_installer | 68 |
1 files changed, 26 insertions, 42 deletions
diff --git a/satellit_installer/satellit_installer b/satellit_installer/satellit_installer index c560b50..17425f8 100755 --- a/satellit_installer/satellit_installer +++ b/satellit_installer/satellit_installer @@ -35,34 +35,36 @@ export LOGDIR="$BASEDIR/config" export INSTALLDIR="/opt/dmsd/" export TASKMANDIR="/opt/taskmanager/" export OPENSLXDIR="/opt/openslx/" -USERKILL="" export DEBIAN_FRONTEND=noninteractive # Part of keepeng apt quiet export LANG=en_US.UTF-8 +# Set list of needed packages (scripting needs) - remember, Debian-specific so far. +PACKAGELIST_SCRIPT="cracklib-runtime" + +# Set list of needed packages (server needs) - remember, Debian-specific so far. +PACKAGELIST_SERVER="mysql-server lighttpd pure-ftpd-mysql atftpd php5-cgi php5-curl cifs-utils" +PACKAGELIST_SERVER+=" sudo php5-common php5-mysqlnd openjdk-7-jre-headless nfs-kernel-server" +PACKAGELIST_SERVER+=" nfs-common" + # # # TRAPPING hierhin! # # -# Set list of needed packages (scripting needs) - remember, Debian-specific so far. -PACKAGELIST_SCRIPT="cracklib-runtime vim" - -# Set list of needed packages (server needs) - remember, Debian-specific so far. -PACKAGELIST_SERVER="mysql-server lighttpd pure-ftpd-mysql atftpd php5-cgi php5-curl cifs-utils" -PACKAGELIST_SERVER+=" sudo php5-common php5-mysqlnd openjdk-7-jre-headless nfs-kernel-server nfs-common pump" -PACKAGELIST_SERVER+=" nfs-common pump" - # First, to include includes include them: +echo -n "# Sourcing includes: " for INCLUDE in "$BASEDIR"/includes/*.inc; do - echo "# Sourcing $INCLUDE..." + echo -n "." source "$INCLUDE" done +echo " ok" ####### Main program ####### install_packages "$PACKAGELIST_SCRIPT" # Packages needed for script setup_dhcp # dhcp: no dhclient but pump + prerequisites # config directory, locales # query_passwords @@ -74,37 +76,19 @@ install_packages "$PACKAGELIST_SERVER" # Packages needed for server check_users # Meet interesting users with uid>=1000 and kill them. # user 65534/sync will be ignored. -add_group openslx 1000 -add_group taskmanager 1001 -add_group ldadp 1002 -add_group images 12345 -add_user openslx 1000 1000 -add_user taskmanager 1001 1001 -add_user bwlehrpool 10001 12345 -add_user ldadp 1002 1002 - -# Adding sudo config for user taskmanager: -sudo_config - -# Now comes mysql stuff; adding databases: -mysql_add_db openslx -mysql_add_db bwLehrpool -# $1=user, $2=database, $3=privileges, $4=password -mysql_add_user bwLehrpool bwLehrpool "DELETE, INSERT, SELECT, UPDATE" "$MYSQL_BWLEHRPOOL_PASS" -mysql_add_user openslx openslx ALL "$MYSQL_OPENSLX_PASS" -# $1=sql-dumpfile, $2=database -mysql_import_dump "$BASEDIR/static_files/db_bwLehrpool_dump.sql" bwLehrpool -mysql_import_dump "$BASEDIR/static_files/db_openslx_dump.sql" openslx - - -# $1: tar.gz-file, $2: option for unpacking base dir -unpack_tar_gz "$BASEDIR/static_files/ftp-config.tar.gz" "-C /" - -# $1: user, $2: database, $3: Password -patch_pureftpd_config bwLehrpool bwLehrpool "$MYSQL_BWLEHRPOOL_PASS" +add_users_groups # Adding necessary users and groups + +sudo_config # Adding sudo config for user taskmanager + +add_mysql_dbs_users # mysql stuff; adding databases and users + +unpack_tar_gz "$BASEDIR/static_files/ftp-config.tar.gz" "-C /" # $1: tar.gz-file, $2: unpacking to directory + +patch_pureftpd_config bwLehrpool bwLehrpool "$MYSQL_BWLEHRPOOL_PASS" # $1: user, $2: database, $3: Password + patch_atftpd_config -# $1: lighttpd http root -patch_lighttpd_config /srv/openslx/www + +patch_lighttpd_config /srv/openslx/www # $1: lighttpd http root install_bwSuite_server /opt/dmsd @@ -126,12 +110,12 @@ script_dropper # Change motd to something openslx-ng-ier... set_motd -# Activate 'purge_install' here - but be careful! + +# Activate 'purge_install' here - but be careful! This is for debugging purposes only! # # purge_install - # umask $OLDUMASK exit 0 |