Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
383a4cc2
Commit
383a4cc2
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Improve prosody upgrades
parent
94a912a2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-xmpp
+33
-5
33 additions, 5 deletions
src/freedombone-app-xmpp
with
33 additions
and
5 deletions
src/freedombone-app-xmpp
+
33
−
5
View file @
383a4cc2
...
...
@@ -44,6 +44,7 @@ prosody_latest_version='0.10'
prosody_nightly
=
319
prosody_nightly_hash
=
'f1fdc8ce5b6f8bfa451d458616a0bbe5ed7c15881415e561586bab39bd705fa4'
prosody_filename
=
prosody-
${
prosody_latest_version
}
-1nightly
${
prosody_nightly
}
prosody_nightly_url
=
"https://prosody.im/nightly/
${
prosody_latest_version
}
/latest/
${
prosody_filename
}
.tar.gz"
xmpp_variables
=(
ONION_ONLY
INSTALLED_WITHIN_DOCKER
...
...
@@ -153,6 +154,33 @@ function upgrade_xmpp {
# by an operating system upgrade
cd
${
INSTALL_DIR
}
/
${
prosody_filename
}
make
prefix
=
/usr
install
else
cd
$INSTALL_DIR
wget
$prosody_nightly_url
if
[
!
-f
${
INSTALL_DIR
}
/
${
prosody_filename
}
.tar.gz
]
;
then
echo
$"Failed to download prosody nightly
$prosody_nightly_url
"
exit
345782
fi
hash_value
=
$(
sha256sum
${
INSTALL_DIR
}
/
${
prosody_filename
}
.tar.gz |
awk
-F
' '
'{print $1}'
)
if
[[
"
$hash_value
"
!=
"
$prosody_nightly_hash
"
]]
;
then
rm
${
INSTALL_DIR
}
/
${
prosody_filename
}
.tar.gz
echo
$'Unexpected hash value for prosody nightly download'
exit
6824283
fi
tar
-xzvf
${
INSTALL_DIR
}
/
${
prosody_filename
}
.tar.gz
cd
${
INSTALL_DIR
}
/
${
prosody_filename
}
./configure
--ostype
=
debian
--prefix
=
/usr
make
prefix
=
/usr
make
prefix
=
/usr
install
if
[
-f
/usr/local/bin/prosody
]
;
then
echo
$'Failed to build prosody nightly to /usr/bin'
rm
${
INSTALL_DIR
}
/
${
prosody_filename
}
.tar.gz
rm
-rf
${
INSTALL_DIR
}
/
${
prosody_filename
}
exit
3672345
fi
rm
${
INSTALL_DIR
}
/
${
prosody_filename
}
.tar.gz
fi
systemctl restart prosody
}
...
...
@@ -425,14 +453,15 @@ function install_xmpp_nightly {
fi
cd
$INSTALL_DIR
wget
https://
prosody
.im/
nightly
/
${
prosody_latest_version
}
/latest/
${
prosody_filename
}
.tar.gz
if
[
!
-f
${
prosody_filename
}
.tar.gz
]
;
then
echo
$"Failed to download prosody nightly
https://
prosody
.im/
nightly
/
${
prosody_latest_version
}
/latest/
${
prosody_filename
}
.tar.gz
"
wget
$
prosody
_
nightly
_url
if
[
!
-f
${
INSTALL_DIR
}
/
${
prosody_filename
}
.tar.gz
]
;
then
echo
$"Failed to download prosody nightly
$
prosody
_
nightly
_url
"
exit
78352
fi
hash_value
=
$(
sha256sum
${
prosody_filename
}
.tar.gz |
awk
-F
' '
'{print $1}'
)
hash_value
=
$(
sha256sum
${
INSTALL_DIR
}
/
${
prosody_filename
}
.tar.gz |
awk
-F
' '
'{print $1}'
)
if
[[
"
$hash_value
"
!=
"
$prosody_nightly_hash
"
]]
;
then
rm
${
INSTALL_DIR
}
/
${
prosody_filename
}
.tar.gz
echo
$'Unexpected hash value for prosody nightly download'
exit
68224283
fi
...
...
@@ -449,7 +478,6 @@ function install_xmpp_nightly {
exit
628732
fi
rm
${
INSTALL_DIR
}
/
${
prosody_filename
}
.tar.gz
rm
-rf
${
INSTALL_DIR
}
/
${
prosody_filename
}
}
function
install_xmpp_main
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment