Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rm path for update package #1625

Open
wants to merge 5 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions bin/ncp-update-nc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ wget -q "$URL" -O nextcloud.tar.bz2 || { echo "Error downloading"; exit 1; }

# backup
####################
BKPDIR=/var/www/
BKPDIR="$BASEDIR"
WITH_DATA=no
COMPRESSED=yes
LIMIT=0
Expand Down Expand Up @@ -129,7 +129,7 @@ trap rollback_simple INT TERM HUP ERR
echo "Install Nextcloud $VER..."
mv -T nextcloud nextcloud-old
tar -xf nextcloud.tar.bz2 # && false # test point
rm -rf /var/www/nextcloud.tar.bz2
rm -rf "$BASEDIR"/nextcloud.tar.bz2

# copy old config
####################
Expand All @@ -143,7 +143,7 @@ cp -raT nextcloud-old/themes/ nextcloud/themes/
####################
for app in nextcloudpi previewgenerator; do
if [[ -d nextcloud-old/apps/"${app}" ]]; then
cp -r -L nextcloud-old/apps/"${app}" /var/www/nextcloud/apps/
cp -r -L nextcloud-old/apps/"${app}" nextcloud/apps/
fi
done

Expand All @@ -165,7 +165,7 @@ rollback() {
rm -rf /var/www/nextcloud.tar.bz2 "$BASEDIR"/nextcloud-old
echo "Rolling back to backup $BKP..."
local TMPDATA
TMPDATA="$( mktemp -d "/var/www/ncp-data.XXXXXX" )" || { echo "Failed to create temp dir" >&2; exit 1; }
TMPDATA="$( mktemp -d "$BASEDIR/recovery/ncp-data.XXXXXX" )" || { echo "Failed to create temp dir" >&2; exit 1; }
[[ "$DATADIR" == "$BASEDIR/nextcloud/data" ]] && mv -T "$DATADIR" "$TMPDATA"
ncp-restore "$BKP" || { echo "Rollback failed! Data left at $TMPDATA"; exit 1; }
[[ "$DATADIR" == "$BASEDIR/nextcloud/data" ]] && { rm -rf "$DATADIR"; mv -T "$TMPDATA" "$DATADIR"; }
Expand Down
6 changes: 3 additions & 3 deletions ncp-web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@

<header role="banner"><div id="header">
<div id="header-left">
<a href="https://ownyourbits.com" id="nextcloudpi" target="_blank" tabindex="1">
<a href="https://nextcloudpi.com" id="nextcloudpi" target="_blank" tabindex="1">
<div class="logo-icon">
<h1 class="hidden-visually">NextCloudPi</h1>
</div>
Expand Down Expand Up @@ -173,7 +173,7 @@
<input type="text" id="search-box" placeholder="find ncp-app" size="40">
</div>
</div>
<a href="https://ownyourbits.com" id="nextcloud-btn" target="_blank" tabindex="1" title="<?php echo $l->__("Launch Nextcloud"); ?>">
<a href="https://nextcloudpi.com/" id="nextcloud-btn" target="_blank" tabindex="1" title="<?php echo $l->__("Launch Nextcloud"); ?>">
<div id="nc-button">
<div class="expand">
<div class="icon-nc-white"></div>
Expand Down Expand Up @@ -207,7 +207,7 @@
</div>
</div>
</a>
<a href="https://github.com/nextcloud/nextcloudpi/wiki" target="_blank" tabindex="1" title="<?php echo $l->__("NextCloudPi Wiki"); ?>">
<a href="https://docs.nextcloudpi.com/" target="_blank" tabindex="1" title="<?php echo $l->__("NextCloudPi Wiki"); ?>">
<div id="nc-button">
<div class="expand">
<div class="icon-nc-info"></div>
Expand Down