Skip to content

Add reboot-notify service #147

Merged
merged 1 commit into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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