So in my postinst.ex file I have now the following code: Code: [...] case "$1" in configure) mkdir -p /etc/myapp/ echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" > /etc/myapp/config.xml echo "<root>" >> /etc/myapp/config.xml echo "</root>" >> /etc/myapp/config.xml ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac [...] And that in my postrm.ex file: Code: case "$1" in purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) rm -r /etc/myapp/ ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac Is that correct? I haven't tested it.
[...] case "$1" in configure) mkdir -p /etc/myapp/ echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" > /etc/myapp/config.xml echo "<root>" >> /etc/myapp/config.xml echo "</root>" >> /etc/myapp/config.xml ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac [...]
case "$1" in purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) rm -r /etc/myapp/ ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac