Skip to content

Instantly share code, notes, and snippets.

@CameronNemo
Last active July 25, 2018 19:22
Show Gist options
  • Save CameronNemo/595e7efa41c7552cd68c77114fb9b8b1 to your computer and use it in GitHub Desktop.
Save CameronNemo/595e7efa41c7552cd68c77114fb9b8b1 to your computer and use it in GitHub Desktop.
[Unit]
Decription=Notify via email when the minetest server starts
Requires=minetest.service
After=minetest.service network-online.target
[Service]
Type=oneshot
Environment="MTN_MAIL=my_minetest@mailing_list.com" "MTN_MUTTRC=/home/USER/.muttrc
ExecStart=/bin/sh -c "echo \"Ready to rumble?\" | mutt -F $MTN_MUTTRC -s \"Minetest Starting up\" $MTN_MAIL"
ExecStop=/bin/sh -c "echo \"Off to bed. Nightie night!\" | mutt -F $MTN_MUTTRC -s \"Minetest Stopping in 2 minutes\" $MTN_MAIL"
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment