diff options
author | Christian Rößler | 2018-04-12 17:53:09 +0200 |
---|---|---|
committer | Christian Rößler | 2018-04-12 17:53:09 +0200 |
commit | 39d580f1135a76a6952988e6f84c89a174ae2fbf (patch) | |
tree | 39420c10d40c9998ceff3a66fec7e95461cc14aa /satellit_installer | |
parent | [SSPS] Quotation mark bug in includes/00-variables.inc (diff) | |
download | setup-scripts-39d580f1135a76a6952988e6f84c89a174ae2fbf.tar.gz setup-scripts-39d580f1135a76a6952988e6f84c89a174ae2fbf.tar.xz setup-scripts-39d580f1135a76a6952988e6f84c89a174ae2fbf.zip |
[SSPS] No more atftpd, now tftpd-hpa gets installed
Diffstat (limited to 'satellit_installer')
-rw-r--r-- | satellit_installer/includes/10-configurations.inc | 29 | ||||
-rwxr-xr-x | satellit_installer/satellit_installer | 4 | ||||
-rw-r--r-- | satellit_installer/static_files/atftpd.service | 11 | ||||
-rw-r--r-- | satellit_installer/static_files/tftpd-hpa.service | 11 |
4 files changed, 30 insertions, 25 deletions
diff --git a/satellit_installer/includes/10-configurations.inc b/satellit_installer/includes/10-configurations.inc index f9072e0..fdd9d61 100644 --- a/satellit_installer/includes/10-configurations.inc +++ b/satellit_installer/includes/10-configurations.inc @@ -1,11 +1,16 @@ -patch_atftpd_config() { - echo -n "# Stopping atftpd server in case it's not managed by inetd... " - [ "$SYSTEMD" ] && systemctl stop atftpd || /etc/init.d/atftpd stop 2>/dev/null 1>&2 +patch_tftpd-hpa_config() { + echo -n "# Stopping tftpd-hpa server in case it's not managed by inetd... " + [ "$SYSTEMD" ] && systemctl stop tftpd-hpa || /etc/init.d/tftpd-hpa stop 2>/dev/null 1>&2 echo "ok." # No sense in patching, we will drop this little entry. - echo -n "# Patching atftpd configuration... " - echo "USE_INETD=false" > /etc/default/atftpd - echo 'OPTIONS="--retry-timeout 1 --maxthread 100 --verbose=5 --no-multicast --bind-address 0.0.0.0 /srv/openslx/tftp"' >> /etc/default/atftpd + echo -n "# Patching tftpd-hpa configuration... " + cat <<- HEREDOC > /etc/default/tftpd-hpa + # /etc/default/tftpd-hpa + TFTP_USERNAME="tftp" + TFTP_DIRECTORY="/srv/openslx/tftp" + TFTP_ADDRESS="0.0.0.0:69" + TFTP_OPTIONS="--secure" + HEREDOC echo "ok." # sometimes a tftp stating line remains in /etc/inetd.conf. Let's have a look and kill this interesting line: echo -n "# Checking /etc/inetd.conf for a tftp entry... " @@ -22,12 +27,12 @@ patch_atftpd_config() { fi } -copy_atftpd_service() { - echo -n "# Copying atftpd service file... " - cp -p "$BASEDIR/static_files/atftpd.service" /etc/systemd/system && echo "ok." || perror "failed." - echo -n "# Linking atftpd service file into (/etc/systemd/system/)multi-user.target.wants... " - ln -s /etc/systemd/system/atftpd.service /etc/systemd/system/multi-user.target.wants/atftpd.service \ - && echo "ok." || perror "Could not link atftpd service file into multiuser target!" +copy_tftpd-hpa_service() { + echo -n "# Copying tftpd-hpa service file... " + cp -p "$BASEDIR/static_files/tftpd-hpa.service" /etc/systemd/system && echo "ok." || perror "failed." + echo -n "# Linking tftpd-hpa service file into (/etc/systemd/system/)multi-user.target.wants... " + ln -s /etc/systemd/system/tftpd-hpa.service /etc/systemd/system/multi-user.target.wants/tftpd-hpa.service \ + && echo "ok." || perror "Could not link tftpd-hpa service file into multiuser target!" } patch_lighttpd_config() { diff --git a/satellit_installer/satellit_installer b/satellit_installer/satellit_installer index e474e5d..84dc5fc 100755 --- a/satellit_installer/satellit_installer +++ b/satellit_installer/satellit_installer @@ -122,8 +122,8 @@ sudo_config # Adding sudo config for user taskmanager add_mysql_dbs_users # mysql stuff; adding databases and users patch_mysql_config # adding utf8 entries to /etc/mysql/my.cnf -patch_atftpd_config -copy_atftpd_service +patch_tftpd-hpa_config +copy_tftpd-hpa_service patch_lighttpd_config "$WWWDIR" # $1: lighttpd http root patch_php_config diff --git a/satellit_installer/static_files/atftpd.service b/satellit_installer/static_files/atftpd.service deleted file mode 100644 index a97dbca..0000000 --- a/satellit_installer/static_files/atftpd.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=atftpd server -After=network.target local-fs.target -Wants=network-online.target - -[Service] -EnvironmentFile=/etc/default/atftpd -Restart=always -RestartSec=5 -TimeoutSec=10 -ExecStart=/usr/sbin/atftpd --no-fork --daemon $OPTIONS diff --git a/satellit_installer/static_files/tftpd-hpa.service b/satellit_installer/static_files/tftpd-hpa.service new file mode 100644 index 0000000..2bf6a3a --- /dev/null +++ b/satellit_installer/static_files/tftpd-hpa.service @@ -0,0 +1,11 @@ +[Unit] +Description=tftpd-hpa (OpenSLX Config) +After=network.target + +[Service] +ExecStart=/usr/sbin/in.tftpd --user tftp --foreground --address :69 --secure --verbose /srv/openslx/tftp +#User=tftp +Restart=on-failure + +[Install] +WantedBy=multi-user.target |