mirror of
https://github.com/azlux/log2ram
synced 2024-11-23 13:56:30 +00:00
Compare commits
9 Commits
4dbafc31ae
...
0d626d8d2f
Author | SHA1 | Date | |
---|---|---|---|
|
0d626d8d2f | ||
83774d470b | |||
|
c449994e22 | ||
|
c7aef205b1 | ||
|
7f2f8d20db | ||
|
69bc7a5cbe | ||
|
02e7e6bcbd | ||
|
e38c73e2d5 | ||
|
a378dd30cb |
4
log2ram
4
log2ram
@ -46,7 +46,7 @@ sync_to_disk() {
|
||||
fi
|
||||
|
||||
if [ -z "${NO_RSYNC}" ] && [ -x "$(command -v rsync)" ]; then
|
||||
rsync -aXv --sparse --inplace --no-whole-file --delete-after "${optional_params[@]}" "$RAM_LOG"/ "$HDD_LOG"/ 2>&1 |
|
||||
rsync -aAXv --sparse --inplace --no-whole-file --delete-after "${optional_params[@]}" "$RAM_LOG"/ "$HDD_LOG"/ 2>&1 |
|
||||
tee -a "$LOG2RAM_LOG"
|
||||
else
|
||||
cp -rfup --sparse=always "$RAM_LOG"/ -T "$HDD_LOG"/ 2>&1 | tee -a "$LOG2RAM_LOG"
|
||||
@ -75,7 +75,7 @@ sync_from_disk() {
|
||||
fi
|
||||
|
||||
if [ -z "${NO_RSYNC}" ] && [ -x "$(command -v rsync)" ]; then
|
||||
rsync -aXv --sparse --inplace --no-whole-file --delete-after "$HDD_LOG"/ "$RAM_LOG"/ 2>&1 | tee -a "$LOG2RAM_LOG"
|
||||
rsync -aAXv --sparse --inplace --no-whole-file --delete-after "$HDD_LOG"/ "$RAM_LOG"/ 2>&1 | tee -a "$LOG2RAM_LOG"
|
||||
else
|
||||
cp -rfup --sparse=always "$HDD_LOG"/ -T "$RAM_LOG"/ 2>&1 | tee -a "$LOG2RAM_LOG"
|
||||
fi
|
||||
|
@ -4,3 +4,20 @@ After=log2ram.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/systemctl reload log2ram.service
|
||||
|
||||
# Sandboxing
|
||||
LockPersonality=true
|
||||
MemoryDenyWriteExecute=true
|
||||
NoNewPriviliges=true
|
||||
PrivateDevices=true
|
||||
PrivateNetwork=true
|
||||
#May affect "Mail" in log2ram.conf.
|
||||
ProtectClock=true
|
||||
ProtectControlGroups=true
|
||||
ProtectHostname=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
RestrictSUIDSGID=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
|
@ -15,5 +15,25 @@ ExecReload=/usr/local/bin/log2ram write
|
||||
TimeoutStartSec=120
|
||||
RemainAfterExit=yes
|
||||
|
||||
# Sandboxing
|
||||
LockPersonality=true
|
||||
MemoryDenyWriteExecute=true
|
||||
NoNewPriviliges=true
|
||||
PrivateDevices=true
|
||||
PrivateNetwork=true
|
||||
#May break "MAIL" in log2ram.conf if it points to non-local web address.
|
||||
ProtectClock=true
|
||||
ProtectControlGroups=true
|
||||
ProtectHostname=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
RestrictSUIDSGID=true
|
||||
ProtectSystem=true
|
||||
# ALT: ProtectSystem=full # needs rw whitelisting for /var/hdd.log/
|
||||
ProtectHome=true
|
||||
#may cause breakage in situations wherein user has configured log2ram to also copy logs from $HOME.
|
||||
#can probably fix with systemctl edit to whitelist relevant dirs. See: ReadWritePaths=
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
|
Loading…
Reference in New Issue
Block a user