Last active
November 19, 2023 17:47
-
-
Save ljchuello/9620d3a5d7b667143c8de0f82565abee to your computer and use it in GitHub Desktop.
OnInit.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Servicio de monitoreo | |
[Service] | |
ExecStart=glances -w -p 27017 -t 1 | |
Restart=always | |
RestartSec=10 | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Updates the packages | |
DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y upgrade | |
# Tools | |
apt install curl -y | |
apt install wget -y | |
apt install unzip -y | |
apt install nginx -y | |
# Firewall | |
apt install ufw -y | |
echo "y" | ufw enable | |
ufw allow 22/tcp | |
ufw allow 80/tcp | |
ufw allow 443/tcp | |
ufw allow 27017/tcp | |
# .NET Core LTS | |
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel LTS --install-dir /usr/share/dotnet | |
ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet | |
# Glances | |
apt install python3 | |
apt install python3-dev -y | |
apt install python3-pip -y | |
wget -O- https://bit.ly/glances | /bin/bash | |
# Glances Service | |
cd /etc/systemd/system/ | |
wget -O glances-y5zgd.service "https://gist.githubusercontent.com/ljchuello/9620d3a5d7b667143c8de0f82565abee/raw/a6bd97620b0f4bcf538921a21f672b65397a052c/glances-y5zgd.service" | |
systemctl start glances-y5zgd | |
systemctl enable glances-y5zgd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment