systemd/debian/systemd.postrm

20 lines
443 B
Bash

#! /bin/sh
set -e
# Clean up the mess we created
statedir=/var/lib/systemd
if [ "$1" = "purge" ] && [ -d $statedir ]; then
find $statedir -name "*.symlinks" | while read file ; do
while read symlink ; do
rm -f "$symlink"
done < "$file"
rm -f "$file"
done
rm -f $statedir/enabled-units
rm -f $statedir/run-debian-enable-units
rmdir --ignore-fail-on-non-empty $statedir
fi
#DEBHELPER#