Skip to content

Commit

Permalink
Merge pull request #147 from mariux64/reboot-notify
Browse files Browse the repository at this point in the history
Add reboot-notify service
  • Loading branch information
pmenzel authored Jan 20, 2021
2 parents ea207f8 + 08037fa commit d9c3686
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ install_symlink /usr/bin/ptype "$DESTDIR$usrlocal_pre
install_symlink /usr/bin/pman "$DESTDIR$usrlocal_prefix/package/bin/pman"
install_data misc_etc_files/sysctl.conf "$DESTDIR$sysconfdir/sysctl.conf"
install_data misc_etc_files/udev/rules.d/51-mariux.rules "$DESTDIR$sysconfdir/udev/rules.d/51-mariux.rules"
install_data misc_systemd_units/reboot-notify.service "$DESTDIR$systemdunitdir/reboot-notify.service"

postinstall
exit
11 changes: 11 additions & 0 deletions misc_systemd_units/reboot-notify.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Requires=network.target
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=bash -c 'last -20 reboot|mailx -s "[REBOOT] $(hostname)" reboot-notify'

[Install]
WantedBy=multi-user.target

0 comments on commit d9c3686

Please sign in to comment.