Skip to content

Instantly share code, notes, and snippets.

@nalakawula
Last active May 3, 2019 06:59
Show Gist options
  • Save nalakawula/77f449bef2958b5750460975864094b3 to your computer and use it in GitHub Desktop.
Save nalakawula/77f449bef2958b5750460975864094b3 to your computer and use it in GitHub Desktop.
[Unit]
Description=Generate email log pekerjaan
[Service]
User=sumarsono
Group=sumarsono
Type=simple
ExecStart=/home/sumarsono/Sumarsono/sumar-bash/generateMail.sh
[Install]
WantedBy=multi-user.target
[Unit]
Description=Generate email log pekerjaan
[Timer]
User=sumarsono
Group=sumarsono
OnCalendar=Mon..Fri 10:00
Unit=generateJobLog.service
[Install]
WantedBy=multi-user.target
#!/usr/bin/bash
printf "From:[email protected]\nSubject:Log Pekerjaan $(date +%Y-%m-%d)\n\nSumarsono\nSysadmin\n\n1. " > /home/sumarsono/Sumarsono/Log-Pekerjaan-$(date +%Y%m%d)
[Unit]
Description=Kirim email log pekerjaan
[Service]
User=sumarsono
Group=sumarsono
Type=simple
ExecStart=/home/sumarsono/Sumarsono/sumar-bash/sendMail.sh
[Install]
WantedBy=multi-user.target
[Unit]
Description=Kirim email log pekerjaan
[Timer]
User=sumarsono
Group=sumarsono
OnCalendar=Mon..Fri 17:00
Unit=kirimJobLog.service
[Install]
WantedBy=multi-user.target
#!/usr/bin/bash
cat /home/sumarsono/Sumarsono/Log-Pekerjaan-$(date +%Y%m%d) | msmtp -a default [email protected],[email protected],[email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment