-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from ltonetwork/juicy-fixes
Juicy fixes
- Loading branch information
Showing
10 changed files
with
57 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
behave.ini | ||
Dockerfile | ||
README.md | ||
e2e | ||
target/classes | ||
target/global-logging | ||
target/src_managed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ docker push $DOCKER_REPO:$MINOR_VERSION | |
|
||
docker tag $IMAGE_NAME $DOCKER_REPO:edge | ||
docker push $DOCKER_REPO:edge | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,10 @@ | ||
${{header}} | ||
${{loader-functions}} | ||
|
||
if [ "$1" = upgrade ]; then | ||
if dpkg --compare-versions "$2" lt 0.7.5 ; then | ||
# change home directory and remove legacy data files | ||
rm -f /home/${{app_name}}/lto/data/blockchain.dat | ||
rm -f /home/${{app_name}}/lto/data/peers.dat | ||
|
||
# delete legacy configuration files | ||
for file_to_remove in application.conf application-dev.conf logback-to-file.xml logback.xml logback-overrides.xml | ||
do | ||
rm -f /usr/share/${{app_name}}/conf/$file_to_remove | ||
done | ||
|
||
rm -fr /usr/share/${{app_name}}/conf/target | ||
|
||
chmod -s -x /usr/share/${{app_name}}/conf/* || true | ||
|
||
# move wallet file to a new default location | ||
if [ -f /home/${{app_name}}/lto/wallet/wallet.s.dat ]; then | ||
echo Moving wallet file to a new default location ... | ||
mkdir -p /var/lib/${{app_name}}/wallet/ | ||
mv /home/${{app_name}}/lto/wallet/wallet.s.dat /var/lib/${{app_name}}/wallet/wallet.dat | ||
fi | ||
|
||
if [ -f /etc/${{app_name}}.conf ]; then | ||
echo Moving node configuration file from /etc/${{app_name}}.conf to /etc/${{app_name}}/lto.conf ... | ||
mv /etc/${{app_name}}.conf /etc/${{app_name}}/lto.conf || true | ||
fi | ||
|
||
# if config file has not been manually altered, just remove lto.directory and wallet.file keys | ||
sed -i.bak '/directory\s*=\s*"\?\/home\/lto\/lto"\?\|file\s*=\s*"\?\/home\/lto\/lto\/wallet\/wallet\.s\.dat/d' /etc/${{app_name}}/lto.conf | ||
|
||
if [ -d /home/${{app_name}}/lto/data ]; then | ||
echo Moving data files ... | ||
|
||
mv /home/${{app_name}}/lto/data /var/lib/${{app_name}}/data || true | ||
mv /home/${{app_name}}/lto/journal /var/lib/${{app_name}}/journal || true | ||
mv /home/${{app_name}}/lto/snapshots /var/lib/${{app_name}}/snapshots || true | ||
fi | ||
|
||
if [ -f /etc/${{app_name}}.json ]; then | ||
echo Moving legacy configuration file to a new location ... | ||
cp /etc/${{app_name}}.json /etc/${{app_name}}/lto.json | ||
chmod -x /etc/${{app_name}}/lto.json | ||
fi | ||
|
||
rm -f /etc/${{app_name}}.json | ||
rm -f /usr/share/${{app_name}}/settings.json | ||
fi | ||
|
||
if dpkg --compare-versions "$2" le 0.8.7 && [ -f /etc/${{app_name}}/lto.conf ] ; then | ||
echo Backing up local configuration file ... | ||
mv /etc/${{app_name}}/lto.conf /etc/${{app_name}}/lto.conf.bak | ||
fi | ||
|
||
if dpkg --compare-versions "$2" lt 0.8.11 ; then | ||
rm -f /etc/${{app_name}}/upstart.conf | ||
if [ -L /etc/init/${{app_name}}.conf ] ; then | ||
rm -f /etc/init/${{app_name}}.conf | ||
fi | ||
chmod -x /etc/${{app_name}}/application.ini | ||
fi | ||
fi | ||
# if [ "$1" = upgrade ]; then | ||
# if dpkg --compare-versions "$2" lt 1.0.0 ; then | ||
# ... | ||
# fi | ||
# fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters