Skip to content

Commit 84d0f32

Browse files
committed
Fix bugs
1 parent 1f6ab17 commit 84d0f32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/update.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ if [[ -d "$INSTALL_DIR" && $(< $INSTALL_DIR/version) == '0.1' ]]; then
2020

2121
/etc/init.d/lwp stop
2222

23-
tmp=$(mktmp)
23+
tmp=$(mktemp -d)
2424

2525
echo 'Backuping database...'
2626
[[ -f "$INSTALL_DIR/lwp.db" ]] && cp "$INSTALL_DIR/lwp.db" "$tmp" || echo "Can't backup the database!"
2727

2828
echo 'Removing old version...'
29-
rm -rf "$INSTALL_DIR/*" "$INSTALL_DIR/.*"
29+
rm -rf $INSTALL_DIR/* $INSTALL_DIR/.* &> /dev/null
3030

3131
echo 'Installing LXC Web Panel v0.2...'
3232
git clone https://github.com/lxc-webpanel/LXC-Web-Panel.git "$INSTALL_DIR"

0 commit comments

Comments
 (0)