Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up deb postrm script #1

Open
tillkruss opened this issue Jun 22, 2021 · 0 comments
Open

Set up deb postrm script #1

tillkruss opened this issue Jun 22, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@tillkruss
Copy link
Member

This might be a good start.

#!/bin/bash

set -e

if [ "$1" = "remove" ]; then
  if [ -e /usr/lib/php/php-maintscript-helper ] ; then
	  . /usr/lib/php/php-maintscript-helper

    php_invoke dismod "<%= php_version %>" cli relay || exit 1
    php_invoke dismod "<%= php_version %>" fpm relay || exit 1
  fi
fi

if [ "$1" = "purge" ] ; then
  find "/etc/php/<%= php_version %>" -xtype l 2>/dev/null | \
    while read symlink; do
      if [ "$(basename "$(readlink -m "${symlink}")")" = "relay.ini" ]; then
		    rm -f "${symlink}"
		  fi
	  done
fi

exit 0
@tillkruss tillkruss added the enhancement New feature or request label Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant