moar stuff
This commit is contained in:
parent
6922e7ca06
commit
87a95b9d76
26
README.md
Normal file
26
README.md
Normal file
@ -0,0 +1,26 @@
|
||||
# server-toolset
|
||||
|
||||
## login mailer.sh
|
||||
|
||||
Get an email when someone logs in on your server.
|
||||
|
||||
Requires you to host/use an email proxy. See [git.fybx.dev/fyb/mail-proxy](https://git.fybx.dev/fyb/mail-proxy) for a simple Express.js and nodemailer powered alternative. Fork and deploy to Vercel, it's set!
|
||||
|
||||
`install.sh` and `uninstall.sh` provided for ease-of-use, places systemctl service and timer, and enables it.
|
||||
|
||||
## credits
|
||||
|
||||
Feel free to contact me for collaboration on anything!
|
||||
|
||||
Yiğid BALABAN, <[fyb@fybx.dev][llmail]>
|
||||
|
||||
[My Website][llwebsite] • [My Bento][llbento] • [X][llx] • [LinkedIn][lllinkedin]
|
||||
|
||||
2024
|
||||
|
||||
[llmail]: mailto:fyb@fybx.dev
|
||||
[llwebsite]: https://fybx.dev
|
||||
[llbento]: https://bento.me/balaban
|
||||
[llx]: https://x.com/fybalaban
|
||||
[lllinkedin]: https://linkedin.com/in/fybx
|
||||
|
7
install.sh
Normal file
7
install.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
cp ./login-mailer.service /etc/systemd/system/login-mailer.service
|
||||
cp ./login-mailer.timer /etc/systemd/system/login-mailer.timer
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now login-mailer.timer
|
||||
systemctl status login-mailer.timer
|
7
login-mailer.service
Normal file
7
login-mailer.service
Normal file
@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Login Mailer
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/root/server-toolset/login-mailer.sh
|
||||
|
11
login-mailer.timer
Normal file
11
login-mailer.timer
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Chore Login Mailer
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1min
|
||||
OnUnitActiveSec=1s
|
||||
Unit=login-mailer.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
14
uninstall.sh
Normal file
14
uninstall.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
systemctl stop login-mailer.timer
|
||||
systemctl disable login-mailer.timer
|
||||
|
||||
if [ -f /etc/systemd/system/login-mailer.service ]; then
|
||||
rm /etc/systemd/system/login-mailer.service
|
||||
fi
|
||||
|
||||
if [ -f /etc/systemd/system/login-mailer.timer ]; then
|
||||
rm /etc/systemd/system/login-mailer.timer
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
Loading…
x
Reference in New Issue
Block a user