Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1.12 KB

README.md

File metadata and controls

30 lines (22 loc) · 1.12 KB

apache-log-to-discord

Final result

apache-log-to-discord
The name and icon of the bot are up to you when creating a webhook (Right-click on channel > Edit channel > Integrations).

Installation

  1. git clone [email protected]:jehanf/apache-log-to-discord.git
  2. cd apache-log-to-discord
  3. npm install

Usage

node index.js /path/to/logfile.log https://discord/webhook/url

Launch in Background

Make tail.sh executable
sudo chmod +x /path/to/apache-log-to-discord/tail.sh

Then :
nohup /path/to/apache-log-to-discord/tail.sh /path/to/apache-log-to-discord/index.js "/path/to/logfile.log" "https://discord/webhook/url" > /dev/null 2>&1 &

Autostart on reboot

Make tail.sh executable
sudo chmod +x /path/to/apache-log-to-discord/tail.sh

Then :

  1. crontab -e
  2. Add @reboot /path/to/apache-log-to-discord/tail.sh /path/to/apache-log-to-discord/index.js "/path/to/logfile.log" "https://discord/webhook/url"
  3. Repeat 1 and 2 for each log you want to add