mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
Update v-commander
This commit is contained in:
parent
6819f21c3e
commit
138a30755f
1 changed files with 30 additions and 10 deletions
|
@ -18,6 +18,7 @@ echo "======================= mvVesta-commander ================================
|
||||||
if [ -f /root/kernelupdate ]; then
|
if [ -f /root/kernelupdate ]; then
|
||||||
rm /root/kernelupdate
|
rm /root/kernelupdate
|
||||||
fi
|
fi
|
||||||
|
apt_updated=0
|
||||||
apt_upgraded=0
|
apt_upgraded=0
|
||||||
quit_on_empty=0
|
quit_on_empty=0
|
||||||
|
|
||||||
|
@ -88,8 +89,8 @@ myhelp() {
|
||||||
echo "inst nginx-rate-limit = install nginx-rate-limit templates"
|
echo "inst nginx-rate-limit = install nginx-rate-limit templates"
|
||||||
echo "dis fb = stop and disable fail2ban"
|
echo "dis fb = stop and disable fail2ban"
|
||||||
echo "dis dove = stop and disable dovecot"
|
echo "dis dove = stop and disable dovecot"
|
||||||
echo "dis spam = stop and disable spam"
|
echo "dis spam = stop and disable spamassassin"
|
||||||
echo "dis clam = stop and disable clamav"
|
echo "dis clam = stop and disable ClamAV"
|
||||||
echo "p 7.0 = set default php 7.0"
|
echo "p 7.0 = set default php 7.0"
|
||||||
echo "p 7.3 = set default php 7.3"
|
echo "p 7.3 = set default php 7.3"
|
||||||
echo "p 7.4 = set default php 7.4"
|
echo "p 7.4 = set default php 7.4"
|
||||||
|
@ -99,9 +100,22 @@ myhelp() {
|
||||||
echo "check fc = check if FreshClam is up"
|
echo "check fc = check if FreshClam is up"
|
||||||
echo "-----------------------------"
|
echo "-----------------------------"
|
||||||
echo "enable-ssh-root-password-login = Allow root password authentication via SSH and set the root password to match the password for the admin account"
|
echo "enable-ssh-root-password-login = Allow root password authentication via SSH and set the root password to match the password for the admin account"
|
||||||
|
echo "id_rsa = generate id_rsa and id_rsa.pub if it does not exist and show id_rsa.pub"
|
||||||
echo "-----------------------------"
|
echo "-----------------------------"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apt_update() {
|
||||||
|
echo "============================="
|
||||||
|
echo "== running: apt-get update"
|
||||||
|
release=$(cat /etc/debian_version | tr "." "\n" | head -n1)
|
||||||
|
if [ "$release" -lt 10 ]; then
|
||||||
|
apt-get update
|
||||||
|
else
|
||||||
|
apt-get update --allow-releaseinfo-change
|
||||||
|
fi
|
||||||
|
apt_updated=1
|
||||||
|
}
|
||||||
|
|
||||||
COUNTER=0
|
COUNTER=0
|
||||||
|
|
||||||
while true
|
while true
|
||||||
|
@ -162,14 +176,7 @@ do
|
||||||
|
|
||||||
|
|
||||||
if [ "$answer" = 'u' ] || [ "$answer" = 'U' ]; then
|
if [ "$answer" = 'u' ] || [ "$answer" = 'U' ]; then
|
||||||
echo "============================="
|
apt_update
|
||||||
echo "== running: apt-get update"
|
|
||||||
release=$(cat /etc/debian_version | tr "." "\n" | head -n1)
|
|
||||||
if [ "$release" -lt 10 ]; then
|
|
||||||
apt-get update
|
|
||||||
else
|
|
||||||
apt-get update --allow-releaseinfo-change
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$answer" = 'g' ] || [ "$answer" = 'G' ]; then
|
if [ "$answer" = 'g' ] || [ "$answer" = 'G' ]; then
|
||||||
|
@ -584,4 +591,17 @@ do
|
||||||
/root/install-new-roundcube.sh
|
/root/install-new-roundcube.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$answer" = 'id_rsa' ] || [ "$answer" = 'ID_RSA' ]; then
|
||||||
|
if [ ! -f "/root/.ssh/id_rsa.pub" ]; then
|
||||||
|
ssh-keygen -q -t rsa -N '' -C "$HOSTNAME" -f /root/.ssh/id_rsa 2>/dev/null <<< y >/dev/null
|
||||||
|
fi
|
||||||
|
echo "=== YOUR id_rsa.pub IS BELOW ==="
|
||||||
|
cat /root/.ssh/id_rsa.pub
|
||||||
|
echo "======"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $numargs -eq 1 ]; then
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue