diff --git a/ct/joplin-server.sh b/ct/joplin-server.sh index 9f4896fc..fb6969cf 100644 --- a/ct/joplin-server.sh +++ b/ct/joplin-server.sh @@ -20,36 +20,36 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/joplin-server ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - if check_for_gh_release "joplin-server" "laurent22/joplin"; then - msg_info "Stopping Services" - systemctl stop joplin-server - msg_ok "Stopped Services" - - fetch_and_deploy_gh_release "joplin-server" "laurent22/joplin" "tarball" "latest" - - msg_info "Updating ${APP}" - cd /opt/joplin-server - sed -i "/onenote-converter/d" packages/lib/package.json - $STD yarn config set --home enableTelemetry 0 - export BUILD_SEQUENCIAL=1 - $STD yarn install --inline-builds - msg_ok "Updated $APP" - - msg_info "Starting Services" - systemctl start joplin-server - msg_ok "Started Services" - - msg_ok "Updated Successfully" - fi + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/joplin-server ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + + if check_for_gh_release "joplin-server" "laurent22/joplin"; then + msg_info "Stopping Services" + systemctl stop joplin-server + msg_ok "Stopped Services" + + fetch_and_deploy_gh_release "joplin-server" "laurent22/joplin" "tarball" "latest" + + msg_info "Updating ${APP}" + cd /opt/joplin-server + sed -i "/onenote-converter/d" packages/lib/package.json + $STD yarn config set --home enableTelemetry 0 + export BUILD_SEQUENCIAL=1 + $STD yarn install --inline-builds + msg_ok "Updated $APP" + + msg_info "Starting Services" + systemctl start joplin-server + msg_ok "Started Services" + + msg_ok "Updated Successfully" + fi + exit } start diff --git a/install/joplin-server-install.sh b/install/joplin-server-install.sh index 6187f565..45f20166 100644 --- a/install/joplin-server-install.sh +++ b/install/joplin-server-install.sh @@ -15,8 +15,8 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - git \ - rsync + git \ + rsync msg_ok "Installed Dependencies" PG_VERSION="17" setup_postgresql @@ -38,10 +38,10 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8' $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" { - echo "Joplin-Credentials" - echo "Joplin Database User: $DB_USER" - echo "Joplin Database Password: $DB_PASS" - echo "Joplin Database Name: $DB_NAME" + echo "Joplin-Credentials" + echo "Joplin Database User: $DB_USER" + echo "Joplin Database Password: $DB_PASS" + echo "Joplin Database Name: $DB_NAME" } >>~/joplin.creds msg_ok "Set up PostgreSQL Database"