mirror of https://github.com/tteck/Proxmox.git
				
				
				
			Compare commits
	
		
			No commits in common. "dbcb900da458fe5ee5dc8ef2492cd1712e69e032" and "e2e4784136c9af3ef4ec3c6fb0655b4863e7d62d" have entirely different histories.
		
	
	
		
			dbcb900da4
			...
			e2e4784136
		
	
		| 
						 | 
					@ -13,15 +13,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
 | 
				
			||||||
> [!NOTE]
 | 
					> [!NOTE]
 | 
				
			||||||
All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
 | 
					All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 2024-10-19
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
### Changed
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
- **Cockpit LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/cockpit-install.sh)
 | 
					 | 
				
			||||||
  - NEW Script
 | 
					 | 
				
			||||||
- **Neo4j LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/neo4j-install.sh)
 | 
					 | 
				
			||||||
  - NEW Script
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## 2024-10-18
 | 
					## 2024-10-18
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Changed
 | 
					### Changed
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										72
									
								
								ct/neo4j.sh
								
								
								
								
							
							
						
						
									
										72
									
								
								ct/neo4j.sh
								
								
								
								
							| 
						 | 
					@ -1,72 +0,0 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					 | 
				
			||||||
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
 | 
					 | 
				
			||||||
# Copyright (c) 2021-2024 tteck
 | 
					 | 
				
			||||||
# Author: tteck
 | 
					 | 
				
			||||||
# Co-Author: havardthom
 | 
					 | 
				
			||||||
# License: MIT
 | 
					 | 
				
			||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function header_info {
 | 
					 | 
				
			||||||
clear
 | 
					 | 
				
			||||||
cat <<"EOF"     
 | 
					 | 
				
			||||||
    _   __           __ __  _ 
 | 
					 | 
				
			||||||
   / | / /__  ____  / // / (_)
 | 
					 | 
				
			||||||
  /  |/ / _ \/ __ \/ // /_/ /
 | 
					 | 
				
			||||||
 / /|  /  __/ /_/ /__  __/ /
 | 
					 | 
				
			||||||
/_/ |_/\___/\____/  /_/_/ /
 | 
					 | 
				
			||||||
                     /___/
 | 
					 | 
				
			||||||
EOF
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
header_info
 | 
					 | 
				
			||||||
echo -e "Loading..."
 | 
					 | 
				
			||||||
APP="Neo4j"
 | 
					 | 
				
			||||||
var_disk="4"
 | 
					 | 
				
			||||||
var_cpu="1"
 | 
					 | 
				
			||||||
var_ram="1024"
 | 
					 | 
				
			||||||
var_os="debian"
 | 
					 | 
				
			||||||
var_version="12"
 | 
					 | 
				
			||||||
variables
 | 
					 | 
				
			||||||
color
 | 
					 | 
				
			||||||
catch_errors
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function default_settings() {
 | 
					 | 
				
			||||||
  CT_TYPE="1"
 | 
					 | 
				
			||||||
  PW=""
 | 
					 | 
				
			||||||
  CT_ID=$NEXTID
 | 
					 | 
				
			||||||
  HN=$NSAPP
 | 
					 | 
				
			||||||
  DISK_SIZE="$var_disk"
 | 
					 | 
				
			||||||
  CORE_COUNT="$var_cpu"
 | 
					 | 
				
			||||||
  RAM_SIZE="$var_ram"
 | 
					 | 
				
			||||||
  BRG="vmbr0"
 | 
					 | 
				
			||||||
  NET="dhcp"
 | 
					 | 
				
			||||||
  GATE=""
 | 
					 | 
				
			||||||
  APT_CACHER=""
 | 
					 | 
				
			||||||
  APT_CACHER_IP=""
 | 
					 | 
				
			||||||
  DISABLEIP6="no"
 | 
					 | 
				
			||||||
  MTU=""
 | 
					 | 
				
			||||||
  SD=""
 | 
					 | 
				
			||||||
  NS=""
 | 
					 | 
				
			||||||
  MAC=""
 | 
					 | 
				
			||||||
  VLAN=""
 | 
					 | 
				
			||||||
  SSH="no"
 | 
					 | 
				
			||||||
  VERB="no"
 | 
					 | 
				
			||||||
  echo_default
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function update_script() {
 | 
					 | 
				
			||||||
header_info
 | 
					 | 
				
			||||||
if [[ ! -d /etc/neo4j ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
 | 
					 | 
				
			||||||
msg_info "Updating ${APP}"
 | 
					 | 
				
			||||||
apt-get update &>/dev/null
 | 
					 | 
				
			||||||
apt-get -y upgrade &>/dev/null
 | 
					 | 
				
			||||||
msg_ok "Updated Successfully"
 | 
					 | 
				
			||||||
exit
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
start
 | 
					 | 
				
			||||||
build_container
 | 
					 | 
				
			||||||
description
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
msg_ok "Completed Successfully!\n"
 | 
					 | 
				
			||||||
echo -e "${APP} Browser should be reachable by going to the following URL.
 | 
					 | 
				
			||||||
         ${BL}http://${IP}:7474${CL} \n"
 | 
					 | 
				
			||||||
							
								
								
									
										24
									
								
								ct/tianji.sh
								
								
								
								
							
							
						
						
									
										24
									
								
								ct/tianji.sh
								
								
								
								
							| 
						 | 
					@ -55,29 +55,7 @@ function default_settings() {
 | 
				
			||||||
function update_script() {
 | 
					function update_script() {
 | 
				
			||||||
header_info
 | 
					header_info
 | 
				
			||||||
if [[ ! -d /opt/tianji ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
 | 
					if [[ ! -d /opt/tianji ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
 | 
				
			||||||
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then
 | 
					msg_error "There is currently no update path available."
 | 
				
			||||||
  read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
 | 
					 | 
				
			||||||
  [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
RELEASE=$(curl -s https://api.github.com/repos/msgbyte/tianji/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
					 | 
				
			||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
 | 
					 | 
				
			||||||
  msg_info "Stopping ${APP} Service"
 | 
					 | 
				
			||||||
  systemctl stop tianji
 | 
					 | 
				
			||||||
  msg_ok "Stopped ${APP} Service"
 | 
					 | 
				
			||||||
  msg_info "Updating ${APP} to ${RELEASE}"
 | 
					 | 
				
			||||||
  cd /opt/tianji
 | 
					 | 
				
			||||||
  git checkout -f -q v${RELEASE}
 | 
					 | 
				
			||||||
  cd src/server
 | 
					 | 
				
			||||||
  pnpm db:migrate:apply >/dev/null 2>&1
 | 
					 | 
				
			||||||
  echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
					 | 
				
			||||||
  msg_ok "Updated ${APP} to ${RELEASE}"
 | 
					 | 
				
			||||||
  msg_info "Starting ${APP}"
 | 
					 | 
				
			||||||
  systemctl start tianji
 | 
					 | 
				
			||||||
  msg_ok "Started ${APP}"
 | 
					 | 
				
			||||||
  msg_ok "Updated Successfully"
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
  msg_ok "No update required.  ${APP} is already at ${RELEASE}."
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
exit
 | 
					exit
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,39 +0,0 @@
 | 
				
			||||||
#!/usr/bin/env bash
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Copyright (c) 2021-2024 tteck
 | 
					 | 
				
			||||||
# Author: tteck
 | 
					 | 
				
			||||||
# Co-Author: havardthom
 | 
					 | 
				
			||||||
# License: MIT
 | 
					 | 
				
			||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
 | 
					 | 
				
			||||||
color
 | 
					 | 
				
			||||||
verb_ip6
 | 
					 | 
				
			||||||
catch_errors
 | 
					 | 
				
			||||||
setting_up_container
 | 
					 | 
				
			||||||
network_check
 | 
					 | 
				
			||||||
update_os
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
msg_info "Installing Dependencies"
 | 
					 | 
				
			||||||
$STD apt-get install -y curl
 | 
					 | 
				
			||||||
$STD apt-get install -y sudo
 | 
					 | 
				
			||||||
$STD apt-get install -y mc
 | 
					 | 
				
			||||||
$STD apt-get install -y gpg
 | 
					 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
msg_info "Installing Neo4j (patience)"
 | 
					 | 
				
			||||||
wget -qO- https://debian.neo4j.com/neotechnology.gpg.key | gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg
 | 
					 | 
				
			||||||
echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable latest' > /etc/apt/sources.list.d/neo4j.list
 | 
					 | 
				
			||||||
$STD apt-get update
 | 
					 | 
				
			||||||
$STD apt-get install -y neo4j
 | 
					 | 
				
			||||||
sed -i '/server.default_listen_address/s/^#//' /etc/neo4j/neo4j.conf
 | 
					 | 
				
			||||||
systemctl enable -q --now neo4j
 | 
					 | 
				
			||||||
msg_ok "Installed Neo4j"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
motd_ssh
 | 
					 | 
				
			||||||
customize
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
msg_info "Cleaning up"
 | 
					 | 
				
			||||||
$STD apt-get -y autoremove
 | 
					 | 
				
			||||||
$STD apt-get -y autoclean
 | 
					 | 
				
			||||||
msg_ok "Cleaned"
 | 
					 | 
				
			||||||
		Loading…
	
		Reference in New Issue