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
c945b7d4
Commit
c945b7d4
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
matrix logging
parent
86371327
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/freedombone-app-matrix
+1
-0
1 addition, 0 deletions
src/freedombone-app-matrix
src/freedombone-logging
+16
-4
16 additions, 4 deletions
src/freedombone-logging
with
17 additions
and
4 deletions
src/freedombone-app-matrix
+
1
−
0
View file @
c945b7d4
...
...
@@ -228,6 +228,7 @@ function matrix_configure_homeserver_yaml {
sed
-i
"s|media_store_path:.*|media_store_path:
\"
${
MATRIX_DATA_DIR
}
/media_store
\"
|g"
"
${
filepath
}
"
sed
-i
"s|pid_file:.*|pid_file:
\"
${
MATRIX_DATA_DIR
}
/homeserver.pid
\"
|g"
"
${
filepath
}
"
sed
-i
"s|log_file:.*|log_file:
\"
/dev/null
\"
|g"
"
${
filepath
}
"
sed
-i
"s|log_config:|#log_config:|g"
"
${
filepath
}
"
sed
-i
's|bind_address:.*|bind_address: 127.0.0.1|g'
"
${
filepath
}
"
sed
-i
"s|bind_addresses:.*|bind_addresses: ['127.0.0.1']|g"
"
${
filepath
}
"
sed
-i
's|x_forwarded:.*|x_forwarded: false|g'
"
${
filepath
}
"
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-logging
+
16
−
4
View file @
c945b7d4
...
...
@@ -78,13 +78,16 @@ if [ ! "$1" ]; then
fi
if
[[
"
$1
"
==
"on"
||
"
$1
"
==
"On"
||
"
$1
"
==
"ON"
]]
;
then
if
[
-f
/var/lib/matrix/homeserver.yaml
]
;
then
sed
-i
's|log_file:.*|log_file: /etc/matrix/homeserver.log|g'
/var/lib/matrix/homeserver.yaml
if
!
grep
-q
"#log_config:"
/var/lib/matrix/homeserver.yaml
;
then
sed
-i
's|log_config:|#log_config:|g'
/var/lib/matrix/homeserver.yaml
fi
fi
if
[
-f
/etc/fail2ban/fail2ban.conf
]
;
then
sed
-i
's|loglevel.*|loglevel = 3|g'
/etc/fail2ban/fail2ban.conf
sed
-i
's|logtarget.*|logtarget = /var/log/fail2ban.log|g'
/etc/fail2ban/fail2ban.conf
fi
if
[
-f
/var/lib/matrix/homeserver.yaml
]
;
then
sed
-i
's|log_file:.*|log_file: /var/lib/matrix/homeserver.log|g'
/var/lib/matrix/homeserver.yaml
fi
if
[
-d
/etc/tor
]
;
then
if
[
!
-f
/var/log/tor.log
]
;
then
touch
/var/log/tor.log
...
...
@@ -148,6 +151,15 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then
else
if
[
-f
/var/lib/matrix/homeserver.yaml
]
;
then
sed
-i
's|log_file:.*|log_file: /dev/null|g'
/var/lib/matrix/homeserver.yaml
if
!
grep
-q
"#log_config:"
/var/lib/matrix/homeserver.yaml
;
then
sed
-i
's|log_config:|#log_config:|g'
/var/lib/matrix/homeserver.yaml
fi
if
[
-f
/etc/matrix/homeserver.log
]
;
then
shred
-zu
/etc/matrix/homeserver.log
fi
if
[
-f
/etc/matrix/homeserver.log.1
]
;
then
shred
-zu
/etc/matrix/homeserver.log.1
fi
fi
if
[
-d
/etc/tor
]
;
then
sed
-i
's|#Log notice file.*|Log notice file /dev/null|g'
/etc/tor/torrc
...
...
@@ -261,7 +273,7 @@ fi
if
[
-d
/etc/fail2ban
]
;
then
systemctl restart fail2ban
fi
if
[
-
f
/
var/lib/matrix/homeserver.yaml
]
;
then
if
[
-
d
/
etc/matrix
]
;
then
systemctl restart matrix
fi
...
...
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