mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-26 13:47:40 +00:00
debianize
- fix make version on debian - update gitignore - add aptly-api and service - install zsh completion - add debug package - move aptly data from orig deb package - do not add shell for service user - use 8080 as default port
This commit is contained in:
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <postinst> `abort-remove'
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
# source debconf library
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
# create an aptly group and user
|
||||
if ! getent passwd aptly-api > /dev/null; then
|
||||
useradd --system --user-group --create-home --home-dir /var/lib/aptly-api aptly-api
|
||||
fi
|
||||
|
||||
# set config file permissions not world readable as it may contain secrets
|
||||
chown root:aptly-api /etc/aptly.conf
|
||||
chmod 640 /etc/aptly.conf
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
exit 0
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
db_stop
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user