1

Is it possible to pass in arguments to the command apt-get install proftpd such that the resulting installation process will assume "stand-alone" mode, without prompting the user for information?

(If necessary, we can probably compile from source or such. I just wanted to see if there was an easier way before going that route.)

1

Well there are ways to do it, i will try to show the possible way or ways :

  • One liner

1) Get debconf-utils

sudo apt-get install debconf-utils

2) Then

echo "proftpd-basic shared/proftpd/inetd_or_standalone select standalone" | debconf-set-selections

3) Then launch the install which should know that you pre-selected Standalone

apt-get install proftpd

Then we can go and write a oneliner:

apt-get --yes --force-yes install debconf-utils &&
  echo "proftpd-basic shared/proftpd/inetd_or_standalone select standalone" | debconf-set-selections
 && apt-get install proftpd

Hope this helps or else try the Script approach

  • Script

check if bin bash is there or adjust as needed

#!/bin/bash

debconf-set-selections <<\EOF
proftpd-basic shared/proftpd/inetd_or_standalone select standalone
EOF

# install
apt-get install proftpd
# ServerType: standalone

# configure 
#sed -i 's|# RequireValidShell|RequireValidShell|g' /etc/proftpd/proftpd.conf
#sed -i 's|# DefaultRoot|DefaultRoot|g' /etc/proftpd/proftpd.conf
#cat <<EOF>> /etc/proftpd/proftpd.conf
#<Limit LOGIN>
#    DenyGroup !ftpuser
# </Limit>
#EOF

# create ftpuser group
#addgroup ftpuser

# restart
/etc/init.d/proftpd restart

I've commented out the Configuration part as i dont know what you would need.

Sources:

How to install Debconf utils and how to capture selections: https://serverfault.com/questions/138067/automate-proftpd-basic-install-on-ubuntu-using-apt-get

force silent install : Automatically answer 'Yes' when using apt-get install

echo message for debconf : https://ubuntuforums.org/showthread.php?t=1365327

And last but not least the SH : http://www.panticz.de/Install-proftpd

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.