mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-17 00:01:14 +02:00
WikiJS: use v2 Repo until v3 is stable (#17895)
* WikiJS: use v2 Repo until v3 is stable * Update wikijs.sh for version 2 support
This commit is contained in:
committed by
GitHub
parent
1a14f2f9af
commit
5842691dad
+13
-11
@@ -32,14 +32,14 @@ function update_script() {
|
|||||||
|
|
||||||
NODE_VERSION="26" NODE_MODULE="yarn,node-gyp" setup_nodejs
|
NODE_VERSION="26" NODE_MODULE="yarn,node-gyp" setup_nodejs
|
||||||
|
|
||||||
if check_for_gh_release "wikijs" "requarks/wiki"; then
|
if check_for_gh_release "wikijs" "requarks/wiki-v2"; then
|
||||||
msg_info "Verifying whether ${APP}' new release is v3.x+ and current install uses SQLite."
|
#msg_info "Verifying whether ${APP}' new release is v3.x+ and current install uses SQLite."
|
||||||
SQLITE_INSTALL=$([ -f /opt/wikijs/db.sqlite ] && echo "true" || echo "false")
|
#SQLITE_INSTALL=$([ -f /opt/wikijs/db.sqlite ] && echo "true" || echo "false")
|
||||||
if [[ "${SQLITE_INSTALL}" == "true" && "${CHECK_UPDATE_RELEASE}" =~ ^3.* ]]; then
|
#if [[ "${SQLITE_INSTALL}" == "true" && "${CHECK_UPDATE_RELEASE}" =~ ^3.* ]]; then
|
||||||
echo "SQLite is not supported in v3.x+, currently there is no update path availble."
|
# echo "SQLite is not supported in v3.x+, currently there is no update path availble."
|
||||||
exit
|
# exit
|
||||||
fi
|
#fi
|
||||||
msg_ok "There is an update path available for ${APP}"
|
#msg_ok "There is an update path available for ${APP}"
|
||||||
|
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop wikijs
|
systemctl stop wikijs
|
||||||
@@ -47,15 +47,17 @@ function update_script() {
|
|||||||
|
|
||||||
msg_info "Backing up Data"
|
msg_info "Backing up Data"
|
||||||
mkdir /opt/wikijs-backup
|
mkdir /opt/wikijs-backup
|
||||||
$SQLITE_INSTALL && cp /opt/wikijs/db.sqlite /opt/wikijs-backup
|
#$SQLITE_INSTALL &&
|
||||||
|
cp /opt/wikijs/db.sqlite /opt/wikijs-backup
|
||||||
cp -R /opt/wikijs/{config.yml,/data} /opt/wikijs-backup
|
cp -R /opt/wikijs/{config.yml,/data} /opt/wikijs-backup
|
||||||
msg_ok "Backed up Data"
|
msg_ok "Backed up Data"
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wikijs" "requarks/wiki" "prebuild" "latest" "/opt/wikijs" "wiki-js.tar.gz"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wikijs" "requarks/wiki-v2" "prebuild" "latest" "/opt/wikijs" "wiki-js.tar.gz"
|
||||||
|
|
||||||
msg_info "Restoring Data"
|
msg_info "Restoring Data"
|
||||||
cp -R /opt/wikijs-backup/* /opt/wikijs
|
cp -R /opt/wikijs-backup/* /opt/wikijs
|
||||||
$SQLITE_INSTALL && $STD npm rebuild sqlite3
|
#$SQLITE_INSTALL &&
|
||||||
|
$STD npm rebuild sqlite3
|
||||||
rm -rf /opt/wikijs-backup
|
rm -rf /opt/wikijs-backup
|
||||||
msg_ok "Restored Data"
|
msg_ok "Restored Data"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ msg_ok "Installed Dependencies"
|
|||||||
NODE_VERSION="26" NODE_MODULE="yarn,node-gyp" setup_nodejs
|
NODE_VERSION="26" NODE_MODULE="yarn,node-gyp" setup_nodejs
|
||||||
PG_VERSION="17" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
PG_DB_NAME="wiki" PG_DB_USER="wikijs_user" PG_DB_EXTENSIONS="pg_trgm" setup_postgresql_db
|
PG_DB_NAME="wiki" PG_DB_USER="wikijs_user" PG_DB_EXTENSIONS="pg_trgm" setup_postgresql_db
|
||||||
fetch_and_deploy_gh_release "wikijs" "requarks/wiki" "prebuild" "latest" "/opt/wikijs" "wiki-js.tar.gz"
|
fetch_and_deploy_gh_release "wikijs" "requarks/wiki-v2" "prebuild" "latest" "/opt/wikijs" "wiki-js.tar.gz"
|
||||||
|
|
||||||
msg_info "Configuring Wiki.js"
|
msg_info "Configuring Wiki.js"
|
||||||
mv /opt/wikijs/config.sample.yml /opt/wikijs/config.yml
|
mv /opt/wikijs/config.sample.yml /opt/wikijs/config.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user