how to install a webmin module by command line (bash)?
3
votes
3
answers
2867
views
I want to install a module in webmin by command line (bash). How do you do this?
Example:
wget https://download.webmin.com/download/modules/text-editor.wbm.gz
inside this .gz: text-editor.wbm
sudo tar -xf text-editor.wbm.gz
The module (in this case text-editor) when installed via GUI:
It sends the files to several places. Example:
To **/usr/share/webmin/text-editor**
To : **/etc/webmin/text-editor**
To: **/var/webmin/modules/text-editor** (empty):
**Important:**
Webmin installation methods used in my test:
Method 1:
sudo sh -c 'echo "deb http://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list'
wget -q http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -
sudo apt -y install webmin
Method 2 :
wget https://prdownloads.sourceforge.net/webadmin/webmin_1.910_all.deb
sudo dpkg --install webmin_1.910_all.deb
I asked the author (Jamie Cameron ) no response to the date, because he is the author of webmin and the author of the module that I try to install
Text Editor 1.4
Description Provides a simple interface for editing text files, with a history of recently-edited files.
Download text-editor.wbm.gz
Author Jamie Cameron
Last updated 2007-04-18 11:27:19
**Update:**
I have managed to make a script that installs the text-editor module. It is not very "elegant", but it works:





sudo chmod +x text-editor.sh && sudo ./text-editor.sh
#!/bin/bash
fshare=/usr/share/webmin/text-editor
fetc=/etc/webmin/text-editor
fvar=/var/webmin/modules/text-editor
if [ ! -d $fshare ]; then mkdir -p $fshare; fi
if [ ! -d $fetc ]; then mkdir -p $fetc; fi
if [ ! -d $fvar ]; then mkdir -p $fvar; fi
touch $fetc/files
wget -c https://download.webmin.com/download/modules/text-editor.wbm.gz
tar -xf text-editor.wbm.gz
cp -f -R text-editor/* $fshare
cp text-editor/config $fetc
sed -i '$ s/$/ text-editor/' /etc/webmin/webmin.acl
sh -c 'echo "text-editor=1" >> /etc/webmin/installed.cache'
/etc/init.d/webmin restart
However, there should be a better method to install any webmin module by command line
Asked by acgbox
(1010 rep)
Jun 5, 2019, 01:45 PM
Last activity: Feb 26, 2022, 02:20 PM
Last activity: Feb 26, 2022, 02:20 PM