diff options
Diffstat (limited to 'pcr/opendnssec/opendnssec.install')
-rw-r--r-- | pcr/opendnssec/opendnssec.install | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pcr/opendnssec/opendnssec.install b/pcr/opendnssec/opendnssec.install new file mode 100644 index 000000000..0c74659ee --- /dev/null +++ b/pcr/opendnssec/opendnssec.install @@ -0,0 +1,27 @@ +post_install() { + if [ -z "`grep '^opendnssec:' /etc/group`" ]; then + groupadd -g 227 opendnssec + fi + if [ -z "`grep '^opendnssec:' /etc/passwd`" ]; then + useradd -u 227 -d /var/lib/opendnssec -g opendnssec -s /bin/false opendnssec + fi + + echo ">> You need an HSM implementation (try softhsm)" +} + + +post_upgrade() { + post_install $1 + OLD=$(echo $2 | sed "s/\(.*\)\.\(.*\)\.\(.*\)/\1\.\2/g") + NEW=$(echo $1 | sed "s/\(.*\)\.\(.*\)\.\(.*\)/\1\.\2/g") + if [ $OLD != "1.4" -a $NEW == "1.4" ]; then + echo ">> NOTICE: UPGRADE TO 1.4" + echo "This update requires upgrading the database" + echo "Run /usr/share/opendnssec/migrate_adapters_1.sqlite3 on your kasp database" + echo "e.g: sqlite3 kasp.db < /usr/share/opendnssec/migrate_adapters_1.sqlite3" + fi +} + +post_remove() { + userdel opendnssec +} |