snap-pac/snapper-pac-post
2016-03-28 19:31:58 +02:00

10 lines
430 B
Bash
Executable file

#!/bin/bash
PREFILE=/etc/snapper/.snap-pac-pre
if [ -f $PREFILE ]; then
SNAPPERPACPRE=$(cat $PREFILE)
snapper --config root create --cleanup-algorithm number --type post --pre-number $SNAPPERPACPRE --description "$(xargs -0 printf '%s ' < /proc/$PPID/cmdline)"
rm $PREFILE
else
echo "WARNING: $PREFILE does not exist, so not performing post snapshot. If you are initially installing snap-pac, this is normal."
fi