After you are done with the package structure, you need to create three control files in the DEBIAN directory.
The DEB control
file contains data required for building the package. Below is a sample of control
file you should save to the DEBIAN directory and edit if needed.
Package: my_skin
Version: 1.0.0-1
Section: non-free/web
Priority: extra
Depends: psa (>= 8.1.0)
Architecture: all
Maintainer: yourmail@domain.tld
Provides: plesk-skin
Description: Skin for Plesk
This is skin for Plesk
In this sample file:
This file is executable script which is automatically run after a package is installed. The postinst
file is a part of the "control" section of a Debian archive file.
Note: This file should be executable.
You can use the following sample of postinst
script:
#!/bin/bash
set -e
case "$1" in
configure)
/opt/psa/admin/bin/skinmng --register --installdir=my_skin --name='My Skin'
;;
abort-upgrade|abort-remove|abort-deconfigure)
echo "$1"
;;
*)
echo "postinst called with unknown argument \`\$1'" >&2
exit 0
;;
esac
Note: The --installdir parameter should be equal to the name of directory, where all skin files locate. For info on directory structure, refer to the Creating Package Structure section.
This file is executable script which is automatically run after a package is removed. The postrm
file is a part of the "control" section of a Debian archive file.
Note: This file should be executable.
You can use the following sample of postrm
script:
#!/bin/bash
set -e
case "$1" in
remove)
echo "!Remove"
/opt/psa/admin/bin/skinmng --remove --installdir=my_skin
;;
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
echo $1
;;
*)
echo "postinst called with unknown argument \`\$1'" >&2
exit 0
;;
esac
Note: The --installdir parameter should be equal to the name of directory, where all skin files locate. For info on directory structure, refer to the Creating Package Structure section.