#!/bin/sh

# Delete files on target in preparation for re-install
#
# This is useful to get a clean slate or when the
# deploy system has difficulty with existing files on upgrade.

set -e

# Environment vars
# DESTDIR, prefix for target files, optional

# Config vars
DEPLOY_DIR="<%= deploy_dir %>"
SERVICE_NAME="<%= service_name %>"

rm -rf "${DESTDIR}${DEPLOY_DIR}"

rm -f $DESTDIR/lib/systemd/system/${SERVICE_NAME}*
