mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-27 13:57:46 +00:00
rename conffile
This commit is contained in:
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
mv_conffile /etc/aptly-api.conf /etc/aptly.conf 1.6~
|
||||||
Vendored
-12
@@ -15,15 +15,6 @@ case "$1" in
|
|||||||
# set config file permissions not world readable as it may contain secrets
|
# set config file permissions not world readable as it may contain secrets
|
||||||
chown root:aptly-api /etc/aptly.conf
|
chown root:aptly-api /etc/aptly.conf
|
||||||
chmod 640 /etc/aptly.conf
|
chmod 640 /etc/aptly.conf
|
||||||
|
|
||||||
if [ -f /etc/aptly-api.conf.migrate ]; then
|
|
||||||
rootDir=`grep rootDir /etc/aptly-api.conf.migrate | sed 's_/var/lib/aptly-api_~_' | sed -n 's/.\+: "\([^"]\+\)".*/\1/p'`
|
|
||||||
if [ -n "$rootDir" ]; then
|
|
||||||
sed -i 's/\(.*"rootDir": "\)[^"]*\(".*\)/\1'$rootDir'\2/' /etc/aptly.conf
|
|
||||||
fi
|
|
||||||
echo "backing up /etc/aptly-api.conf to /etc/aptly-api.conf.old..."
|
|
||||||
mv /etc/aptly-api.conf.migrate /etc/aptly-api.conf.old
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
@@ -35,9 +26,6 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# dh_installdeb will replace this with shell code automatically
|
|
||||||
# generated by other debhelper scripts.
|
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Vendored
+4
-7
@@ -4,10 +4,10 @@ set -e
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||||
# Only remove /var/lib/aptly-api on purge
|
# only remove /var/lib/aptly-api on purge
|
||||||
if [ "${1}" = "purge" ] ; then
|
if [ "${1}" = "purge" ] ; then
|
||||||
rm -rf /var/lib/aptly-api
|
rm -rf /var/lib/aptly-api
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
@@ -16,9 +16,6 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# dh_installdeb will replace this with shell code automatically
|
|
||||||
# generated by other debhelper scripts.
|
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
-18
@@ -1,24 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
|
||||||
# see: dh_installdeb(1)
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# summary of how this script can be called:
|
|
||||||
# * <new-preinst> `install'
|
|
||||||
# * <new-preinst> `install' <old-version>
|
|
||||||
# * <new-preinst> `upgrade' <old-version>
|
|
||||||
# * <old-preinst> `abort-upgrade' <new-version>
|
|
||||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
||||||
# the debian-policy package
|
|
||||||
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install|upgrade)
|
install|upgrade)
|
||||||
if [ -f /etc/aptly-api.conf ]; then
|
|
||||||
echo "migrating /etc/aptly-api.conf ..."
|
|
||||||
mv /etc/aptly-api.conf /etc/aptly-api.conf.migrate
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
abort-upgrade)
|
abort-upgrade)
|
||||||
@@ -30,9 +15,6 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# dh_installdeb will replace this with shell code automatically
|
|
||||||
# generated by other debhelper scripts.
|
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user