removed uneccessary dialogs
This commit is contained in:
@@ -1,26 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ask to install docker
|
||||
if [[ ! -f /etc/apt/keyrings/docker.gpg ]]
|
||||
then
|
||||
read -r -p "Install Docker? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]
|
||||
then
|
||||
apt-get update
|
||||
apt-get install -y ca-certificates curl gnupg lsb-release
|
||||
chown -R akanealw:akanealw /home/akanealw/docker
|
||||
mkdir -m 0755 -p /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
apt-get update
|
||||
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
groupadd docker > /dev/null 2>&1
|
||||
usermod -aG docker akanealw
|
||||
systemctl enable docker.service
|
||||
systemctl enable containerd.service
|
||||
systemctl start docker.service
|
||||
systemctl start containerd.service
|
||||
systemctl status docker.service
|
||||
systemctl status containerd.service
|
||||
fi
|
||||
apt-get update
|
||||
apt-get install -y ca-certificates curl gnupg lsb-release
|
||||
chown -R akanealw:akanealw /home/akanealw/docker
|
||||
mkdir -m 0755 -p /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
apt-get update
|
||||
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
groupadd docker > /dev/null 2>&1
|
||||
usermod -aG docker akanealw
|
||||
systemctl enable docker.service
|
||||
systemctl enable containerd.service
|
||||
systemctl start docker.service
|
||||
systemctl start containerd.service
|
||||
systemctl status docker.service
|
||||
systemctl status containerd.service
|
||||
else
|
||||
echo "Docker is already configured."
|
||||
fi
|
||||
|
||||
@@ -1,26 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ask to install samba
|
||||
if [[ ! -f /etc/samba/smb.conf ]]
|
||||
isInFile=$(cat /etc/samba/smb.conf | grep -c "akanealw")
|
||||
if [ $isInFile -eq 0 ]
|
||||
then
|
||||
read -r -p "Install Samba? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]
|
||||
then
|
||||
apt-get install -y samba --no-install-recommends
|
||||
(echo "8ung1e1!"; sleep 1; echo "8ung1e1!" ) | smbpasswd -s -a akanealw
|
||||
sed -i s/WORKGROUP/akanealw/ /etc/samba/smb.conf
|
||||
isInFile=$(cat /etc/samba/smb.conf | grep -c "akanealw]")
|
||||
if [ $isInFile -eq 0 ]
|
||||
then
|
||||
echo "[akanealw]" >> /etc/samba/smb.conf
|
||||
echo " comment = akanealw" >> /etc/samba/smb.conf
|
||||
echo " read only = no" >> /etc/samba/smb.conf
|
||||
echo " path = /home/akanealw" >> /etc/samba/smb.conf
|
||||
echo " guest ok = no" >> /etc/samba/smb.conf
|
||||
echo "" >> /etc/samba/smb.conf
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
systemctl restart smbd
|
||||
systemctl status smbd
|
||||
apt-get install -y samba --no-install-recommends
|
||||
(echo "8ung1e1!"; sleep 1; echo "8ung1e1!" ) | smbpasswd -s -a akanealw
|
||||
sed -i s/WORKGROUP/akanealw/ /etc/samba/smb.conf
|
||||
echo "[akanealw]" >> /etc/samba/smb.conf
|
||||
echo " comment = akanealw" >> /etc/samba/smb.conf
|
||||
echo " read only = no" >> /etc/samba/smb.conf
|
||||
echo " path = /home/akanealw" >> /etc/samba/smb.conf
|
||||
echo " guest ok = no" >> /etc/samba/smb.conf
|
||||
echo "" >> /etc/samba/smb.conf
|
||||
systemctl restart smbd
|
||||
systemctl status smbd
|
||||
else
|
||||
echo "Samba is already configured."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user