mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-08 16:59:17 +00:00
update a lot of things
This commit is contained in:
parent
c5d9a8bd9f
commit
48974e6ea4
@ -4,58 +4,31 @@ source <(curl -s https://raw.githubusercontent.com/kristocopani/ProxmoxVE/build/
|
|||||||
# Author: kristocopani
|
# Author: kristocopani
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://semaphoreui.com/
|
||||||
|
|
||||||
function header_info {
|
# App Default Values
|
||||||
clear
|
|
||||||
cat <<"EOF"
|
|
||||||
_____ __
|
|
||||||
/ ___/___ ____ ___ ____ _____ / /_ ____ ________
|
|
||||||
\__ \/ _ \/ __ `__ \/ __ `/ __ \/ __ \/ __ \/ ___/ _ \
|
|
||||||
___/ / __/ / / / / / /_/ / /_/ / / / / /_/ / / / __/
|
|
||||||
/____/\___/_/ /_/ /_/\__,_/ .___/_/ /_/\____/_/ \___/
|
|
||||||
/_/
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
header_info
|
|
||||||
echo -e "Loading..."
|
|
||||||
APP="Semaphore"
|
APP="Semaphore"
|
||||||
var_disk="4"
|
var_tags="Semaphore"
|
||||||
var_cpu="2"
|
var_cpu="2"
|
||||||
var_ram="2048"
|
var_ram="2048"
|
||||||
|
var_disk="4"
|
||||||
var_os="debian"
|
var_os="debian"
|
||||||
var_version="12"
|
var_version="12"
|
||||||
|
var_unprivileged="1"
|
||||||
|
|
||||||
|
# App Output & Base Settings
|
||||||
|
header_info "$APP"
|
||||||
|
base_settings
|
||||||
|
|
||||||
|
# Core
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
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() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
|
|
||||||
if [[ ! -f /etc/systemd/system/semaphore.service ]]; then
|
if [[ ! -f /etc/systemd/system/semaphore.service ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
@ -93,5 +66,6 @@ build_container
|
|||||||
description
|
description
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${APP} server should be reachable by connecting to the following server.
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
${BL}http://${IP}:3000${CL} \n"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
@ -24,35 +24,36 @@ UBUNTU_CODENAME=jammy
|
|||||||
wget -qO- "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" | gpg --dearmour >/usr/share/keyrings/ansible-archive-keyring.gpg
|
wget -qO- "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" | gpg --dearmour >/usr/share/keyrings/ansible-archive-keyring.gpg
|
||||||
$STD echo "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/ansible.list
|
$STD echo "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/ansible.list
|
||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt install -y \
|
$STD apt install -y ansible
|
||||||
ansible
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Semaphore"
|
msg_info "Setup Semaphore"
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/semaphoreui/semaphore/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -s https://api.github.com/repos/semaphoreui/semaphore/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
mkdir -p /opt/semaphore
|
mkdir -p /opt/semaphore
|
||||||
cd /opt/semaphore
|
cd /opt/semaphore
|
||||||
wget -q https://github.com/semaphoreui/semaphore/releases/download/v${RELEASE}/semaphore_${RELEASE}_linux_amd64.deb
|
wget -q https://github.com/semaphoreui/semaphore/releases/download/v${RELEASE}/semaphore_${RELEASE}_linux_amd64.deb
|
||||||
$STD dpkg -i semaphore_${RELEASE}_linux_amd64.deb
|
$STD dpkg -i semaphore_${RELEASE}_linux_amd64.deb
|
||||||
rm -rf semaphore_${RELEASE}_linux_amd64.deb
|
|
||||||
|
|
||||||
json_cookie_hash=$(head -c32 /dev/urandom | base64)
|
SEM_HASH=$(openssl rand -base64 32)
|
||||||
json_cookie_encryption=$(head -c32 /dev/urandom | base64)
|
SEM_ENCRYPTION=$(openssl rand -base64 32)
|
||||||
json_access_key_encryption=$(head -c32 /dev/urandom | base64)
|
SEM_KEY=$(openssl rand -base64 32)
|
||||||
|
SEM_PW=$(openssl rand -base64 8)
|
||||||
cat <<EOF >/opt/semaphore/config.json
|
cat <<EOF >/opt/semaphore/config.json
|
||||||
{
|
{
|
||||||
"bolt": {
|
"bolt": {
|
||||||
"host": "/opt/semaphore/semaphore_db.bolt"
|
"host": "/opt/semaphore/semaphore_db.bolt"
|
||||||
},
|
},
|
||||||
"tmp_path": "/opt/semaphore/tmp",
|
"tmp_path": "/opt/semaphore/tmp",
|
||||||
"cookie_hash": "${json_cookie_hash}",
|
"cookie_hash": "${SEM_HASH}",
|
||||||
"cookie_encryption": "${json_cookie_encryption}",
|
"cookie_encryption": "${SEM_ENCRYPTION}",
|
||||||
"access_key_encryption": "${json_access_key_encryption}"
|
"access_key_encryption": "${SEM_KEY}"
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
$STD semaphore user add --admin --login admin --email admin@example.com --name Administrator --password admin --config /opt/semaphore/config.json
|
|
||||||
|
$STD semaphore user add --admin --login admin --email admin@helper-scripts.com --name Administrator --password ${SEM_PW} --config /opt/semaphore/config.json
|
||||||
|
echo "${SEM_PW}" >~./semaphore.creds
|
||||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
msg_ok "Installed Semaphore"
|
msg_ok "Setup Semaphore"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/semaphore.service
|
cat <<EOF >/etc/systemd/system/semaphore.service
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"categories": [
|
"categories": [
|
||||||
11
|
11
|
||||||
],
|
],
|
||||||
"date_created": "2024-11-29",
|
"date_created": "2024-12-26",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": true,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
@ -16,7 +16,7 @@
|
|||||||
"install_methods": [
|
"install_methods": [
|
||||||
{
|
{
|
||||||
"type": "default",
|
"type": "default",
|
||||||
"script": "/ct/semaphore.sh",
|
"script": "ct/semaphore.sh",
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": 2,
|
"cpu": 2,
|
||||||
"ram": 2048,
|
"ram": 2048,
|
||||||
|
Loading…
Reference in New Issue
Block a user