Update Joplin
This commit is contained in:
parent
1d83f681fa
commit
82c81e8ad4
@ -20,36 +20,36 @@ color
|
|||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -d /opt/joplin-server ]]; then
|
if [[ ! -d /opt/joplin-server ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
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
|
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
|
start
|
||||||
|
@ -15,8 +15,8 @@ update_os
|
|||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
git \
|
git \
|
||||||
rsync
|
rsync
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="17" setup_postgresql
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||||
{
|
{
|
||||||
echo "Joplin-Credentials"
|
echo "Joplin-Credentials"
|
||||||
echo "Joplin Database User: $DB_USER"
|
echo "Joplin Database User: $DB_USER"
|
||||||
echo "Joplin Database Password: $DB_PASS"
|
echo "Joplin Database Password: $DB_PASS"
|
||||||
echo "Joplin Database Name: $DB_NAME"
|
echo "Joplin Database Name: $DB_NAME"
|
||||||
} >>~/joplin.creds
|
} >>~/joplin.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
msg_ok "Set up PostgreSQL Database"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user