mirror of
https://github.com/erenfro/systemrescue-backup.git
synced 2024-12-22 00:01:09 -05:00
31 lines
449 B
Bash
Executable file
31 lines
449 B
Bash
Executable file
#!/bin/bash
|
|
|
|
restoreDir="/etc/restore"
|
|
|
|
hook_before() {
|
|
mkdir -p "$restoreDir" || exit 1
|
|
pushd "$restoreDir" || exit 2
|
|
|
|
eopkg li > Packages.list
|
|
|
|
popd || exit 2
|
|
}
|
|
|
|
hook_after() {
|
|
:
|
|
}
|
|
|
|
hook_fail() {
|
|
:
|
|
}
|
|
|
|
hook_final() {
|
|
:
|
|
}
|
|
|
|
case "$1" in
|
|
before) hook_before || exit $?;;
|
|
after) hook_after || exit $?;;
|
|
fail) hook_fail || exit $?;;
|
|
finally) hook_final || exit $?;;
|
|
esac
|