A shell script that puts Webmin into Alpine Linux

reference

Webmin - Alpine Linux AlpineLinux 3.6: Install Webmin, a web-based system management tool

Body

#webmin version
WEBMIN_VRESION=1.960

#Download webmin
curl -sL https://prdownloads.sourceforge.net/webadmin/webmin-${WEBMIN_VERSION}.tar.gz \
     -o webmin-${WEBMIN_VERSION}.tar.gz

#Expand webmin
tar zxf webmin-${WEBMIN_VERSION}.tar.gz -C /var/lib/
mv /var/lib/webmin-${WEBMIN_VERSION} /var/lib/webmin
rm -rf webmin-${WEBMIN_VERSION}.tar.gz
cd /var/lib/webmin

#Run the webmin installation script and answer the questions appropriately
cat << EOF | ./setup.sh
/etc/webmin
/var/log/webmin
/usr/bin/perl
10000
admin


y
EOF

#Is it because the init system is openrc in Alpine Linux?
#Since automatic startup cannot be enabled with the installation script, create an init script yourself and add execution attributes.
cat << EOF > /etc/init.d/webmin
#!/sbin/openrc-run
start() { /etc/webmin/start; }
stop() { /etc/webmin/stop; }
EOF

chmod a+x /etc/init.d/webmin

#Register an init script so that it starts automatically when Linux starts
rc-update add webmin boot

Recommended Posts

A shell script that puts Webmin into Alpine Linux
Let's try a shell script
[Linux] Copy data from Linux to Windows with a shell script
A shell script that just emails the SQL execution result
[Linux] Write a deployment tool using rsync with a shell script
[Infrastructure] Linux command, shell script collection
[Ubuntu] How to execute a shell script
Manage logrotate generations with a shell script.
A script that morphologically parses a specified URL
Creating a shell script to write a diary
[Python, PyPDF2] A script that divides a spread PDF into two left and right
View today's weather forecast with a shell script
A script that just gets an RSS feed
"Python Kit" that calls a Python script from Swift
Launch a shell while a Python script is running
A site that converts curl commands into requests
A shell program that displays the Fibonacci sequence
A python script that imports a dated csv file into BigQuery as a time partition table
A script that combines multiple pages of a PDF file into one page without margins