Skip to content

Commit

Permalink
easyinstall: Install vsftpd webmin module
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmark committed Dec 10, 2023
1 parent 05b9e0e commit 7117492
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions easyinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,9 @@ function installSamba() {
# Installs and configures Webmin
function installWebmin() {
WEBMIN_PATH="/usr/share/webmin"
WEBMIN_MODULE_CONFIG="/etc/webmin/netatalk2/config"
WEBMIN_MODULE_VERSION="1.0"
WEBMIN_NETATALK_MODULE_CONFIG="/etc/webmin/netatalk2/config"
WEBMIN_NETATALK_MODULE_VERSION="1.0"
WEBMIN_VSFTPD_MODULE_VERSION="2023-12-10"

if [ -d "$WEBMIN_PATH" ]; then
echo
Expand All @@ -971,21 +972,26 @@ function installWebmin() {
rm setup-repos.sh
sudo apt-get install webmin --no-install-recommends --assume-yes </dev/null
echo
echo "Downloading and installing Webmin module..."
if [[ -f "$WEBMIN_MODULE_CONFIG" ]]; then
echo "$WEBMIN_MODULE_CONFIG already exists; will not modify..."
WEBMIN_MODULE_FLAG=1
echo "Downloading and installing Webmin modules..."
if [[ -f "$WEBMIN_NETATALK_MODULE_CONFIG" ]]; then
echo "$WEBMIN_NETATALK_MODULE_CONFIG already exists; will not modify..."
WEBMIN_MODULE_FLAG=1
fi

rm netatalk2-wbm.tgz 2> /dev/null || true
wget -O netatalk2-wbm.tgz "https://github.com/Netatalk/netatalk-webmin/releases/download/netatalk2-$WEBMIN_MODULE_VERSION/netatalk2-wbm-$WEBMIN_MODULE_VERSION.tgz" </dev/null
wget -O netatalk2-wbm.tgz "https://github.com/Netatalk/netatalk-webmin/releases/download/netatalk2-$WEBMIN_NETATALK_MODULE_VERSION/netatalk2-wbm-$WEBMIN_NETATALK_MODULE_VERSION.tgz" </dev/null
sudo "$WEBMIN_PATH/install-module.pl" netatalk2-wbm.tgz

if [[ ! $WEBMIN_MODULE_FLAG ]]; then
echo "Modifying $WEBMIN_MODULE_CONFIG..."
sudo sed -i 's@/usr/sbin@/usr/local/sbin@' "$WEBMIN_MODULE_CONFIG"
echo "Modifying $WEBMIN_NETATALK_MODULE_CONFIG..."
sudo sed -i 's@/usr/sbin@/usr/local/sbin@' "$WEBMIN_NETATALK_MODULE_CONFIG"
fi
rm netatalk2-wbm.tgz || true

rm vsftpd.wbm.gz 2> /dev/null || true
wget -O vsftpd.wbm.tgz "https://github.com/rdmark/vsftpd-webmin/releases/download/$WEBMIN_VSFTPD_MODULE_VERSION/vsftpd-$WEBMIN_VSFTPD_MODULE_VERSION.wbm.gz" </dev/null
sudo "$WEBMIN_PATH/install-module.pl" vsftpd.wbm.tgz
rm vsftpd.wbm.tgz || true
}

# updates configuration files and installs packages needed for the OLED screen script
Expand Down Expand Up @@ -1465,7 +1471,8 @@ function runChoice() {
echo "This script will make the following changes to your system:"
echo "- Add a 3rd party apt repository"
echo "- Install and start the Webmin webapp"
echo "- Install the netatalk2 Webmin module"
echo "- Install the netatalk2 Webmin module"
echo "- Install the vsftpd Webmin module"
installWebmin
echo "Install Webmin - Complete!"
echo "The Webmin webapp should now be listening to port 10000 on this system"
Expand Down Expand Up @@ -1537,7 +1544,7 @@ function showMenu() {
echo "EXPERIMENTAL FEATURES"
echo " 15) Share the images dir over AppleShare (requires Netatalk)"
echo " 16) Compile PiSCSI binaries"
echo " 17) Install Webmin to manage Netatalk and Samba"
echo " 17) Install Webmin to manage companion apps"
}

# parse arguments passed to the script
Expand Down

0 comments on commit 7117492

Please sign in to comment.