mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-17 05:24:45 -04:00
OneDev: use the onedev.server unit of 16.9
16.9.0 replaced the Tanuki wrapper; a fresh server.sh install now creates onedev.server.service, so the install failed on 'Unit onedev.service not found' (#17943). Upgraded installs keep their onedev.service, so update uses whichever unit exists.
This commit is contained in:
@@ -25,7 +25,10 @@ function update_script() {
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /etc/systemd/system/onedev.service ]]; then
|
||||
# Installs from before 16.9.0 keep their onedev.service; newer ones get onedev.server.service
|
||||
SERVICE="onedev.server"
|
||||
[[ -f /etc/systemd/system/onedev.service ]] && SERVICE="onedev"
|
||||
if [[ ! -f "/etc/systemd/system/${SERVICE}.service" ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
@@ -34,7 +37,7 @@ function update_script() {
|
||||
JAVA_VERSION="21" setup_java
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop onedev
|
||||
systemctl stop "$SERVICE"
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating OneDev"
|
||||
@@ -48,7 +51,7 @@ function update_script() {
|
||||
msg_ok "Updated OneDev"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start onedev
|
||||
systemctl start "$SERVICE"
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
|
||||
@@ -28,7 +28,7 @@ curl -fsSL "https://code.onedev.io/onedev/server/~sites/public/onedev-latest.tar
|
||||
tar -xzf onedev-latest.tar.gz
|
||||
mv /opt/onedev-latest /opt/onedev
|
||||
$STD /opt/onedev/bin/server.sh install
|
||||
systemctl start onedev
|
||||
systemctl start onedev.server
|
||||
rm -rf /opt/onedev-latest.tar.gz
|
||||
echo "${RELEASE}" >~/.onedev
|
||||
msg_ok "Installed OneDev"
|
||||
|
||||
Reference in New Issue
Block a user