[Git][debian-proftpd-team/proftpd][master] Fix indentation, remove trailing white space.

Hilmar Preuße (@hilmar-guest) gitlab at salsa.debian.org
Tue Oct 18 07:36:31 BST 2022



Hilmar Preuße pushed to branch master at Debian ProFTPD Team / proftpd


Commits:
930b3089 by Hilmar Preusse at 2022-10-18T08:36:15+02:00
Fix indentation, remove trailing white space.

- - - - -


1 changed file:

- debian/proftpd-core.postinst


Changes:

=====================================
debian/proftpd-core.postinst
=====================================
@@ -25,46 +25,46 @@ MODULES_NEW=$ETC_DIR/modules.conf.proftpd-new
 
 installftp()
 {
-	if ! getent passwd ftp > /dev/null
-	then
-	    adduser --system ftp --home /srv/ftp || true
-            if [ -f /usr/share/proftpd/templates/welcome.msg -a -d ~ftp ] ; then
-                cp -p -v /usr/share/proftpd/templates/welcome.msg ~ftp/welcome.msg.proftpd-new || true
-                do_update ~ftp/welcome.msg || true
-	    fi
-	fi
+    if ! getent passwd ftp > /dev/null
+    then
+        adduser --system ftp --home /srv/ftp || true
+        if [ -f /usr/share/proftpd/templates/welcome.msg -a -d ~ftp ] ; then
+            cp -p -v /usr/share/proftpd/templates/welcome.msg ~ftp/welcome.msg.proftpd-new || true
+            do_update ~ftp/welcome.msg || true
+        fi
+    fi
 }
 
 add_sysuser()
 {
-	if ! getent passwd proftpd > /dev/null
-	then
-		adduser --system --disabled-login --no-create-home --home /run/proftpd proftpd || true
-	else
-		usermod --home=/run/proftpd proftpd || true
-	fi
+    if ! getent passwd proftpd > /dev/null
+    then
+	adduser --system --disabled-login --no-create-home --home /run/proftpd proftpd || true
+    else
+	usermod --home=/run/proftpd proftpd || true
+    fi
 }
 
 list_options()
 {
     if [ -f $CONF_NEW ] ; then
-	sed -i -e "s/lsdefaultoptions/ListOptions/i" $CONF_NEW 
+	sed -i -e "s/lsdefaultoptions/ListOptions/i" $CONF_NEW
     fi
 }
 
 tcpwin_options()
 {
     if [ -f $CONF_NEW ] ; then
-        sed -i -e "s/tcpreceivewindow/SocketOptions rcvbuf/i" \
-            -e "s/tcpsendwindow/SocketOptions sndbuf/i" $CONF_NEW 
+	sed -i -e "s/tcpreceivewindow/SocketOptions rcvbuf/i" \
+            -e "s/tcpsendwindow/SocketOptions sndbuf/i" $CONF_NEW
     fi
 }
-                                                                                         
+
 scoreboard()
 {
     if [ -f $CONF_NEW ] ; then
-        sed -i -e "s/\(scoreboardpath.*\)/#\n#ScoreboardPath is deprecated in 1.2.9, use ScoreboardFile instead\n#\1\n#\n#ScoreboardFile\t\/run\/proftpd\/proftpd.scoreboard\n#/i" \
-                                                $CONF_NEW 
+	sed -i -e "s/\(scoreboardpath.*\)/#\n#ScoreboardPath is deprecated in 1.2.9, use ScoreboardFile instead\n#\1\n#\n#ScoreboardFile\t\/run\/proftpd\/proftpd.scoreboard\n#/i" \
+	$CONF_NEW
     fi
 }
 
@@ -72,9 +72,9 @@ include_modules()
 {
     if [ -f $CONF_NEW ] ; then
 	if ! egrep -qi "^[[:space:]]*Include.*/etc/proftpd/modules.conf" $CONF_NEW ; then
-		printf "#\n# Includes required DSO modules. This is mandatory in proftpd 1.3\n#\nInclude\t/etc/proftpd/modules.conf\n\n" >$CONF_NEW.tmp.$$
-		cat $CONF_NEW >>$CONF_NEW.tmp.$$
-		mv -f $CONF_NEW.tmp.$$ $CONF_NEW
+	    printf "#\n# Includes required DSO modules. This is mandatory in proftpd 1.3\n#\nInclude\t/etc/proftpd/modules.conf\n\n" >$CONF_NEW.tmp.$$
+	    cat $CONF_NEW >>$CONF_NEW.tmp.$$
+	    mv -f $CONF_NEW.tmp.$$ $CONF_NEW
 	fi
     fi
 }
@@ -103,7 +103,7 @@ replace_file () {
 	mv ${file}.proftpd-new ${file}
     else
 	cp $file ${file}.proftpd-old
-	ucf ${file}.proftpd-new $file 
+	ucf ${file}.proftpd-new $file
     fi
 }
 
@@ -119,24 +119,24 @@ do_update () {
 
 create_rundir () {
     if [ ! -d /run/proftpd ]; then
-       mkdir /run/proftpd
+	mkdir /run/proftpd
     fi
 }
 
 disable_script () {
-	file=$1
-	if [ -x ${file} ]; then
-			cp ${file} ${file}.disabled
-			cat >${file}.disabled <<EOF
+    file=$1
+    if [ -x ${file} ]; then
+	cp ${file} ${file}.disabled
+	cat >${file}.disabled <<EOF
 #!/bin/sh
 # This script has been disabled at upgrade time
 
 exit 0
 
 EOF
-			cat ${file} >>${file}.disabled
-			rm -f ${file}
-	fi
+	cat ${file} >>${file}.disabled
+	rm -f ${file}
+    fi
 }
 
 # update-inetd is used if found, else you are on your own
@@ -160,15 +160,15 @@ if [ "$1" = "configure" ]; then
     for name in proftpd modules sql ldap tls virtuals sftp geoip snmp
     do
       if [ ! -f $ETC_DIR/$name.conf ]; then
-          cp  /usr/share/proftpd/templates/$name.conf $ETC_DIR/$name.conf.proftpd-new
+          cp /usr/share/proftpd/templates/$name.conf $ETC_DIR/$name.conf.proftpd-new
       else
-          cp  $ETC_DIR/$name.conf $ETC_DIR/$name.conf.proftpd-new
+          cp $ETC_DIR/$name.conf $ETC_DIR/$name.conf.proftpd-new
       fi
     done
-    
+
     # update-inetd does not manage hostlist prefix to service, at least avoid to add a duplicated line
     if [ -f /etc/inetd.conf -a $(grep -qs '^([[:alnum:],.]+)?:?ftp[[:space:]]+' /etc/inetd.conf|wc -l) -eq 0 ]; then
-    	$UPDATE_INETD --group STANDARD --add '#<off># ftp	stream	tcp	nowait	root /usr/sbin/tcpd /usr/sbin/proftpd' 
+    	$UPDATE_INETD --group STANDARD --add '#<off># ftp	stream	tcp	nowait	root /usr/sbin/tcpd /usr/sbin/proftpd'
     fi
 
     add_sysuser
@@ -182,9 +182,9 @@ if [ "$1" = "configure" ]; then
     identlookups
     add_mod_ident
 
-	# disable old cron jobs if needed
-	disable_script /etc/cron.monthly/proftpd
-	disable_script /etc/cron.monthly/proftpd-basic
+    # disable old cron jobs if needed
+    disable_script /etc/cron.monthly/proftpd
+    disable_script /etc/cron.monthly/proftpd-basic
 
     # propose maintainer changes to user
     do_update /etc/proftpd/proftpd.conf
@@ -197,23 +197,23 @@ if [ "$1" = "configure" ]; then
     do_update /etc/proftpd/geoip.conf
     do_update /etc/proftpd/snmp.conf
 
-	# be safe and change permissions for .conf files where passwords should
-	# potentially be present
-	chmod 600 /etc/proftpd/sql.conf* /etc/proftpd/ldap.conf* || true
+    # be safe and change permissions for .conf files where passwords should
+    # potentially be present
+    chmod 600 /etc/proftpd/sql.conf* /etc/proftpd/ldap.conf* || true
 
     # clean run files (pidfile and scoreboard)
-    rm -f /run/proftpd/proftpd* /run/proftpd.pid 
+    rm -f /run/proftpd/proftpd* /run/proftpd.pid
 
-	# enable and start proftpd daemon via systemctl
-	if egrep -qi "^[[:space:]]*ServerType.*standalone" /etc/proftpd/proftpd.conf
-	then
-		deb-systemd-invoke enable proftpd.service
-		deb-systemd-invoke restart proftpd.service
-	fi
+    # enable and start proftpd daemon via systemctl
+    if egrep -qi "^[[:space:]]*ServerType.*standalone" /etc/proftpd/proftpd.conf
+    then
+	deb-systemd-invoke enable proftpd.service
+	deb-systemd-invoke restart proftpd.service
+    fi
 fi
 
 if [ -e "/etc/init.d/proftpd" ]; then
-    set +e 
+    set +e
     proftpd -t >/dev/null 2>&1
     if [ $? = 0 ]; then
 	set -e



View it on GitLab: https://salsa.debian.org/debian-proftpd-team/proftpd/-/commit/930b30891c7b0a2c7341bdcec7fdb558cfe5b408

-- 
View it on GitLab: https://salsa.debian.org/debian-proftpd-team/proftpd/-/commit/930b30891c7b0a2c7341bdcec7fdb558cfe5b408
You're receiving this email because of your account on salsa.debian.org.




More information about the Pkg-proftpd-maintainers mailing list