mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-11 18:49:24 +00:00
Install and use the vsftpd webmin module
This commit is contained in:
parent
6d88932b85
commit
24e60faed6
@ -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
|
||||
@ -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
|
||||
@ -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"
|
||||
@ -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 the system and companion apps"
|
||||
}
|
||||
|
||||
# parse arguments passed to the script
|
||||
|
@ -146,7 +146,7 @@
|
||||
{% if webmin_configured %}
|
||||
<ul>
|
||||
<li class="service-item extlink">
|
||||
<a href="https://{{ env["ip_addr"] }}:10000/webmin/samba/" target=\"_blank\">{{ _("Manage the SMB server") }}</a>
|
||||
<a href="https://{{ env["ip_addr"] }}:10000/samba/" target=\"_blank\">{{ _("Manage the SMB server") }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
@ -158,6 +158,13 @@
|
||||
{{ _("FTP file sharing is disabled.") }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if webmin_configured %}
|
||||
<ul>
|
||||
<li class="service-item extlink">
|
||||
<a href="https://{{ env["ip_addr"] }}:10000/vsftpd/" target=\"_blank\">{{ _("Manage the FTP server") }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if macproxy_configured %}
|
||||
<li class="service-item enabled">
|
||||
{{ _("Vintage web proxy is running at %(ip_addr)s (default port 5000)", ip_addr=env['ip_addr']) }}
|
||||
|
Loading…
Reference in New Issue
Block a user