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
7aedc27b
Commit
7aedc27b
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Add prosody daemon restart on upgrades
parent
50408559
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
+13
-6
13 additions, 6 deletions
src/freedombone-app-xmpp
with
13 additions
and
6 deletions
src/freedombone-app-xmpp
+
13
−
6
View file @
7aedc27b
...
...
@@ -375,6 +375,17 @@ function update_prosody_modules {
fi
}
function
prosody_daemon_restart_script
{
# On rare occasions the daemon appears to get stuck
# i.e. still active, but not accepting connections
# This ensures that it will unstick itself at least once per day
if
[
!
-f
/etc/cron.daily/prosody
]
;
then
echo
'#!/bin/bash'
>
/etc/cron.daily/prosody
echo
'systemctl restart prosody'
>>
/etc/cron.daily/prosody
chmod
+x /etc/cron.daily/prosody
fi
}
function
upgrade_xmpp
{
if
[
-d
/etc/letsencrypt
]
;
then
prosody_groups
=
$(
groups
prosody
)
...
...
@@ -382,6 +393,7 @@ function upgrade_xmpp {
usermod
-a
-G
ssl-cert prosody
fi
fi
prosody_daemon_restart_script
function_check update_prosody_modules
update_prosody_modules
xmpp_onion_addresses /etc/prosody/prosody.cfg.lua
...
...
@@ -1060,12 +1072,7 @@ function install_xmpp {
exit
347682
fi
# On rare occasions the daemon appears to get stuck
# i.e. still active, but not accepting connections
# This ensures that it will unstick itself at least once per day
echo
'#!/bin/bash'
>
/etc/cron.daily/prosody
echo
'systemctl restart prosody'
>>
/etc/cron.daily/prosody
chmod
+x /etc/cron.daily/prosody
prosody_daemon_restart_script
${
PROJECT_NAME
}
-pass
-u
$MY_USERNAME
-a
xmpp
-p
"
$XMPP_PASSWORD
"
...
...
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