Skip to content

Set up deb postrm script #1

Open
@tillkruss

Description

@tillkruss

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions