From 06d4a08cde754bf32fc8c7d224c2f118c70d59f0 Mon Sep 17 00:00:00 2001 From: akanealw Date: Thu, 14 Mar 2024 20:16:12 -0500 Subject: [PATCH] removed cronicle installer and added aliases --- proxmox/proxmox-pbs-essentials.sh | 39 +++++-------------------------- proxmox/proxmox-pve-essentials.sh | 39 +++++-------------------------- 2 files changed, 12 insertions(+), 66 deletions(-) diff --git a/proxmox/proxmox-pbs-essentials.sh b/proxmox/proxmox-pbs-essentials.sh index aaa930d..2f2aaaa 100755 --- a/proxmox/proxmox-pbs-essentials.sh +++ b/proxmox/proxmox-pbs-essentials.sh @@ -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 diff --git a/proxmox/proxmox-pve-essentials.sh b/proxmox/proxmox-pve-essentials.sh index e8d3b13..6f42dfa 100755 --- a/proxmox/proxmox-pve-essentials.sh +++ b/proxmox/proxmox-pve-essentials.sh @@ -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