Es gibt Möglichkeiten, dies zu tun, ich werde versuchen, die möglichen Wege aufzuzeigen:
- Einzeiler
1) Holen Sie sich debconf-utils
sudo apt-get install debconf-utils
2) Dann
echo "proftpd-basic shared/proftpd/inetd_or_standalone select standalone" | debconf-set-selections
3) Starten Sie dann die Installation, die wissen sollte, dass Sie Standalone ausgewählt haben
apt-get install proftpd
Dann können wir einen Oneliner schreiben:
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
Hoffe das hilft oder probieren Sie den Script-Ansatz
- Skript
Prüfen Sie, ob bin bash vorhanden ist, oder passen Sie sie bei Bedarf an
#!/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
Ich habe den Konfigurationsteil auskommentiert, da ich nicht weiß, was Sie brauchen würden.
Quellen:
So installieren Sie Debconf-Dienstprogramme und erfassen Optionen: https://serverfault.com/questions/138067/automate-proftpd-basic-install-on-ubuntu-using-apt-get
Automatische Installation erzwingen: Antworten Sie automatisch mit "Ja", wenn Sie apt-get install verwenden
Echo-Nachricht für debconf: https://ubuntuforums.org/showthread.php?t=1365327
Und nicht zuletzt die SH: http://www.panticz.de/Install-proftpd