ProxmoxVE/install/onedev-install.sh

44 lines
983 B
Bash
Raw Normal View History

2024-11-30 11:40:59 +00:00
#!/usr/bin/env bash
# Copyright (c) 2021-2024 community-scripts ORG
# Author: kristocopani
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/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 \
mc \
2024-11-30 12:04:29 +00:00
sudo \
2024-11-30 12:11:07 +00:00
default-jdk \
2024-11-30 12:04:29 +00:00
git
2024-11-30 11:40:59 +00:00
msg_ok "Installed Dependencies"
2024-11-30 12:04:29 +00:00
msg_info "Installing OneDev"
2024-11-30 11:40:59 +00:00
cd /opt
2024-11-30 12:04:29 +00:00
wget -q https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz
tar -xzf onedev-latest.tar.gz
mv /opt/onedev-latest /opt/onedev
$STD /opt/onedev/bin/server.sh install
2024-11-30 12:15:26 +00:00
systemctl start onedev
2024-11-30 12:04:29 +00:00
RELEASE=$(cat /opt/onedev/release.properties | grep "version" | cut -d'=' -f2)
2024-11-30 11:40:59 +00:00
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
2024-11-30 12:04:29 +00:00
msg_ok "Installed OneDev"
2024-11-30 11:40:59 +00:00
motd_ssh
customize
msg_info "Cleaning up"
2024-11-30 12:04:29 +00:00
rm -rf /opt/onedev-latest.tar.gz
2024-11-30 11:40:59 +00:00
$STD apt-get -y autoremove
$STD apt-get -y autoclean
2024-11-30 12:04:29 +00:00
msg_ok "Cleaned"