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
62e04497
Commit
62e04497
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Function to remove syncthing
parent
089b8e20
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-syncthing
+19
-0
19 additions, 0 deletions
src/freedombone-app-syncthing
with
19 additions
and
0 deletions
src/freedombone-app-syncthing
+
19
−
0
View file @
62e04497
...
...
@@ -37,6 +37,25 @@ SYNCTHING_PORT=22000
SYNCTHING_SHARED_DATA
=
/var/lib/syncthing/SyncShared
SYNCTHING_USER_IDS_FILE
=
'.syncthingids'
function
remove_syncthing
{
if
!
grep
-Fxq
"install_syncthing"
$COMPLETION_FILE
;
then
return
fi
iptables
-D
INPUT
-p
udp
--dport
$SYNCTHING_PORT
-j
ACCEPT
iptables
-D
INPUT
-p
tcp
--dport
$SYNCTHING_PORT
-j
ACCEPT
function_check save_firewall_settings
save_firewall_settings
systemctl stop syncthing
systemctl disable syncthing
apt-get
-y
remove
--purge
syncthing
rm
/etc/systemd/system/syncthing.service
sed
-i
'/freedombone-syncthing/d'
/etc/crontab
sed
-i
'/install_syncthing/d'
$COMPLETION_FILE
sed
-i
'/configure_firewall_for_syncthing/d'
$COMPLETION_FILE
systemctl restart cron
}
function
configure_firewall_for_syncthing
{
if
grep
-Fxq
"configure_firewall_for_syncthing"
$COMPLETION_FILE
;
then
return
...
...
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