Téléverser les fichiers vers "sio2/CYBER/Journald"

This commit is contained in:
alhassane.kone 2023-12-25 11:38:14 +01:00
parent bdc9b72e1b
commit 993ae82b02
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#!/bin/bash
sudo timedatectl set-timezone Europe/Paris
sudo apt-get update
sudo apt-get install -y systemd-journal-remote
sudo systemctl enable --now systemd-journal-remote.socket
sudo cp /lib/systemd/system/systemd-journal-remote.service /etc/systemd/system
sudo sed -i 's/--listen-https=-3/--listen-http=-3/' /etc/systemd/system/systemd-journal-remote.service
[[ -d /var/log/journal/remote ]] || sudo mkdir /var/log/journal/remote
sudo chown systemd-journal-remote /var/log/journal/remote
sudo systemctl daemon-reload

View File

@ -0,0 +1,9 @@
#!/bin/bash
# usage : ./journald-snd.sh 192.168.1.100
sudo timedatectl set-timezone Europe/Paris
sudo apt-get update
sudo apt-get install -y systemd-journal-remote
rpl="s/^# URL=/URL=http:\/\/${1}:19532/" # $1 represente l'adresse du recepteur
sudo sed -i "$rpl" /etc/systemd/journal-upload.conf
sudo systemctl enable --now systemd-journal-upload.service
sudo systemctl restart systemd-journal-upload.service