mirror of
https://github.com/jordansissel/fpm
synced 2025-02-23 01:51:16 +01:00
The `install.sh` will generate a cleanup.sh script that is executed when the package is removed.
13 lines
303 B
Bash
13 lines
303 B
Bash
#!/bin/sh
|
|
|
|
source="<%= attributes[:prefix] %>"
|
|
|
|
if [ -f "$source/cleanup.sh" ] ; then
|
|
echo "Running cleanup to remove service for package <%= attributes[:name] %>"
|
|
set -e
|
|
sh "$source/cleanup.sh"
|
|
|
|
# Remove the script also since the package installation generated it.
|
|
rm "$source/cleanup.sh"
|
|
fi
|