removed cronicle installer and added aliases

This commit is contained in:
2024-03-14 20:16:12 -05:00
parent 23f836447c
commit 06d4a08cde
2 changed files with 12 additions and 66 deletions

View File

@@ -51,6 +51,12 @@ echo "alias start='sudo systemctl start'" >> /etc/bash.bashrc
echo "alias stop='sudo systemctl stop'" >> /etc/bash.bashrc
echo "alias restart='sudo systemctl restart'" >> /etc/bash.bashrc
echo "alias status='sudo systemctl status'" >> /etc/bash.bashrc
echo "alias sdr='sudo systemctl daemon-reload'" >> /etc/bash.bashrc
echo "alias senable='sudo systemctl enable'" >> /etc/bash.bashrc
echo "alias sdisable='sudo systemctl disable'" >> /etc/bash.bashrc
echo "alias snano='sudo nano'" >> /etc/bash.bashrc
echo "alias sreboot='sudo reboot'" >> /etc/bash.bashrc
echo "alias spoweroff='sudo poweroff'" >> /etc/bash.bashrc
echo "alias tf='sudo tail -f'" >> /etc/bash.bashrc
echo "alias aptupy='sudo apt update && sudo apt upgrade -y'" >> /etc/bash.bashrc
echo "alias aptiy='sudo apt install -y'" >> /etc/bash.bashrc
@@ -62,11 +68,8 @@ echo "alias aptl='sudo apt list --installed'" >> /etc/bash.bashrc
echo "alias aptsh='sudo apt show'" >> /etc/bash.bashrc
echo "alias aptac='sudo apt-get autoclean'" >> /etc/bash.bashrc
echo "alias dpkgi='sudo dpkg -i'" >> /etc/bash.bashrc
echo "alias sreboot='sudo reboot'" >> /etc/bash.bashrc
echo "alias spoweroff='sudo poweroff'" >> /etc/bash.bashrc
echo "alias tmuxls='tmux ls'" >> /etc/bash.bashrc
echo "alias tmuxa='tmux attach -t'" >> /etc/bash.bashrc
echo "alias wrestic='sudo wrestic'" >> /etc/bash.bashrc
# create tmux config
rm /etc/tmux.conf* > /dev/null 2>&1
@@ -109,33 +112,3 @@ if [ $isInFile -eq 0 ]
else
echo "Email already configured."
fi
# install cronicle worker
if [[ -f /opt/cronicle/conf/config.json ]]
then
isInFile=$(cat /opt/cronicle/conf/config.json | grep -c "192.168.1.4")
if [ $isInFile -eq 0 ]
then
/opt/cronicle/bin/control.sh stop
rm /opt/cronicle/conf/config.json
wget -qO /opt/cronicle/conf/config.json http://192.168.1.50/files/debian/cronicle-config.json
/opt/cronicle/bin/control.sh start
echo "Cronicle config updated."
else
echo "Cronicle worker already installed."
fi
else
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs -y
curl -s https://raw.githubusercontent.com/jhuckaby/Cronicle/master/bin/install.js | node
rm /opt/cronicle/conf/config.json
wget -qO /opt/cronicle/conf/config.json http://192.168.1.50/files/debian/cronicle-config.json
/opt/cronicle/bin/control.sh start
echo "Cronicle worker installed."
fi

View File

@@ -60,6 +60,12 @@ echo "alias start='sudo systemctl start'" >> /etc/bash.bashrc
echo "alias stop='sudo systemctl stop'" >> /etc/bash.bashrc
echo "alias restart='sudo systemctl restart'" >> /etc/bash.bashrc
echo "alias status='sudo systemctl status'" >> /etc/bash.bashrc
echo "alias sdr='sudo systemctl daemon-reload'" >> /etc/bash.bashrc
echo "alias senable='sudo systemctl enable'" >> /etc/bash.bashrc
echo "alias sdisable='sudo systemctl disable'" >> /etc/bash.bashrc
echo "alias snano='sudo nano'" >> /etc/bash.bashrc
echo "alias sreboot='sudo reboot'" >> /etc/bash.bashrc
echo "alias spoweroff='sudo poweroff'" >> /etc/bash.bashrc
echo "alias tf='sudo tail -f'" >> /etc/bash.bashrc
echo "alias aptupy='sudo apt update && sudo apt upgrade -y'" >> /etc/bash.bashrc
echo "alias aptiy='sudo apt install -y'" >> /etc/bash.bashrc
@@ -71,11 +77,8 @@ echo "alias aptl='sudo apt list --installed'" >> /etc/bash.bashrc
echo "alias aptsh='sudo apt show'" >> /etc/bash.bashrc
echo "alias aptac='sudo apt-get autoclean'" >> /etc/bash.bashrc
echo "alias dpkgi='sudo dpkg -i'" >> /etc/bash.bashrc
echo "alias sreboot='sudo reboot'" >> /etc/bash.bashrc
echo "alias spoweroff='sudo poweroff'" >> /etc/bash.bashrc
echo "alias tmuxls='tmux ls'" >> /etc/bash.bashrc
echo "alias tmuxa='tmux attach -t'" >> /etc/bash.bashrc
echo "alias wrestic='sudo wrestic'" >> /etc/bash.bashrc
# create tmux config
rm /etc/tmux.conf* > /dev/null 2>&1
@@ -118,33 +121,3 @@ if [ $isInFile -eq 0 ]
else
echo "Email already configured."
fi
# install cronicle worker
if [[ -f /opt/cronicle/conf/config.json ]]
then
isInFile=$(cat /opt/cronicle/conf/config.json | grep -c "192.168.1.4")
if [ $isInFile -eq 0 ]
then
/opt/cronicle/bin/control.sh stop
rm /opt/cronicle/conf/config.json
wget -qO /opt/cronicle/conf/config.json http://192.168.1.50/files/debian/cronicle-config.json
/opt/cronicle/bin/control.sh start
echo "Cronicle config updated."
else
echo "Cronicle worker already installed."
fi
else
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs -y
curl -s https://raw.githubusercontent.com/jhuckaby/Cronicle/master/bin/install.js | node
rm /opt/cronicle/conf/config.json
wget -qO /opt/cronicle/conf/config.json http://192.168.1.50/files/debian/cronicle-config.json
/opt/cronicle/bin/control.sh start
echo "Cronicle worker installed."
fi