install script

master
ifiguero 2021-12-28 03:22:58 -03:00
parent 6e3c0a758e
commit 01bcb2fc74
4 changed files with 21 additions and 0 deletions

View File

@ -2,6 +2,12 @@
cp pysmtp-server.service /etc/systemd/system/pysmtp-server.service
cp pysmtp-sender.service /etc/systemd/system/pysmtp-sender.service
mkdir -p /var/log/pysmtp-sender
mkdir -p /var/log/pysmtp-server
cp -f pysmtp.conf /etc/logrotate.d/pysmtp.conf
chmod 644 /etc/logrotate.d/pysmtp.conf
systemctl unmask pysmtp-server.service
systemctl enable pysmtp-server.service
systemctl start pysmtp-server.service
@ -9,3 +15,5 @@ systemctl start pysmtp-server.service
systemctl unmask pysmtp-sender.service
systemctl enable pysmtp-sender.service
systemctl start pysmtp-sender.service
systemctl restart logrotate

View File

@ -6,6 +6,8 @@ After=multi-user.target
Type=simple
Restart=always
ExecStart=/usr/bin/python3 /srv/sender.py
StandardOutput=append:/var/log/pysmtp-sender/messages.log
StandardError=append:/var/log/pysmtp-sender/errors.log
[Install]
WantedBy=multi-user.target

View File

@ -6,6 +6,8 @@ After=multi-user.target
Type=simple
Restart=always
ExecStart=/usr/bin/python3 /srv/server.py
StandardOutput=append:/var/log/pysmtp-server/messages.log
StandardError=append:/var/log/pysmtp-server/errors.log
[Install]
WantedBy=multi-user.target

9
pysmtp.conf 100644
View File

@ -0,0 +1,9 @@
/var/log/pysmtp-server/*.log /var/log/pysmtp-sender/*.log {
daily
missingok
rotate 90
compress
delaycompress
notifempty
dateext
}