Some fixes...

This commit is contained in:
Fliegerjohn 2023-08-25 16:43:20 +02:00
parent 95f4122677
commit 4e9d25a3d4

View file

@ -32,7 +32,7 @@ deletebackup="no"
#
# Set Starttime of script
starttime=`date +"%Y%m%d"`
starttime=`date +"%Y%m%d_%H%M%S"`
echo "Starting update at $starttime"
# Stopping dendrite
@ -55,14 +55,13 @@ if [[ ! -d "$backupdir" ]]; then
fi
mkdir $backupdir/dendrite-$starttime/
mv $installdir/* $backupdir/dendrite-$starttime/
mv $installdir/* $backupdir/dendrite-$starttime
# Clone https://github.com/matrix-org/dendrite to $workdir
su $dendriteuser -s $SHELL -lc "git clone https://github.com/matrix-org/dendrite $workdir/dendrite"
# Compile dendrite
cd $workdir/dendrite
su $dendriteuser -s $SHELL -lc "go build -o /opt/dendrite/bin/ ./cmd/..."
su $dendriteuser -s $SHELL -lc "cd $workdir/dendrite && go build -o /opt/dendrite/bin/ ./cmd/..."
# Starting dendrite
$startdendrite