-
Notifications
You must be signed in to change notification settings - Fork 0
/
crashplanfix.sh
executable file
·33 lines (27 loc) · 1.13 KB
/
crashplanfix.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# CrashPlan fix for Synology package upgrades that keep breaking and stopping CrashPlan
# Rajesh Raheja
# October 2015
# Usage: Run this and pass the crashplan update number (the long number) as input e.g. curl -Ls <scriptURI> | sh -s <UpgradeNumber>
echo The following upgrades are found:
ls -l /var/packages/CrashPlan/target/upgrade/*.jar
unset upgradenum
if [ -z "$1" ];
then
echo "No CrashPlan Upgrade Number provided"
exit 1;
else
upgradenum="$1" ;
echo "Processing upgrade $upgradenum"
fi
unzip -o /var/packages/CrashPlan/target/upgrade/${upgradenum}.jar "*.jar" -d /var/packages/CrashPlan/target/lib/
unzip -o /var/packages/CrashPlan/target/upgrade/${upgradenum}.jar "lang/*" -d /var/packages/CrashPlan/target/
upgradedirlist=`ls -d /var/packages/CrashPlan/target/upgrade/${upgradenum}.*/`
echo Folders to process: `echo $upgradedirlist | wc -l`
for upgradedir in $upgradedirlist ;
do
echo Processing folder ${upgradedir}
mv ${upgradedir}upgrade.sh ${upgradedir}upgrade.sh.old
done
echo The contents of /var/lib/crashplan/.ui_info file: `cat /var/lib/crashplan/.ui_info ; echo`
echo Restart CrashPlan service and check logs.