Changeset 90530ec


Ignore:
Timestamp:
Aug 9, 2017, 3:40:24 PM (9 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, debian/jessie
Children:
ba861c4
Parents:
1bdb08d
git-author:
Joachim Langenbach <joachim.langenbach@…> (08/08/17 14:40:50)
git-committer:
Joachim Langenbach <joachim.langenbach@…> (08/09/17 15:40:24)
Message:

Fixed gnuboat-puppet.postinst script

Location:
debian
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • debian/changelog

    r1bdb08d r90530ec  
     1gnuboat (0.4.9) jessie; urgency=low
     2
     3  * Fixed gnuboat-puppet postinst script
     4
     5 -- EngSaS - Maintainer <info@engsas.de>  Tue, 08 Aug 2017 14:45:00 +0200
    16gnuboat (0.4.8) jessie; urgency=low
    27
  • debian/control

    r1bdb08d r90530ec  
    33Priority: optional
    44Maintainer: EngSaS - Maintainer <info@engsas.de>
    5 Build-Depends: debhelper (>= 9), lsb-release, dh-python, dh-systemd (>= 1.5), po-debconf, python-all, python3-all, python-all-dbg, python3-all-dbg, python-setuptools, python3-setuptools, python-rrdtool, python-pynmea2, python3-pynmea2, phing, php-pear
     5# Removed po-debconf, as puppet could not be run from postinst script (see gnuboat-puppet.postinst for details)
     6Build-Depends: debhelper (>= 9), lsb-release, dh-python, dh-systemd (>= 1.5), python-all, python3-all, python-all-dbg, python3-all-dbg, python-setuptools, python3-setuptools, python-rrdtool, python-pynmea2, python3-pynmea2, phing, php-pear
    67Standards-Version: 3.9.6
    78Homepage: https://trac.falaba.de/gnuboat
  • debian/gnuboat-jessie.postinst

    r1bdb08d r90530ec  
    1 #!/bin/bash
     1#!/bin/sh
    22
    33set -e
  • debian/gnuboat-puppet.config

    r1bdb08d r90530ec  
    44
    55# Debconf library
    6 . /usr/share/debconf/confmodule
     6#. /usr/share/debconf/confmodule
    77
    8 db_input medium gnuboat-puppet/runpuppetagent || true
    9 db_go
     8#db_input medium gnuboat-puppet/runpuppetagent || true
     9#db_go
    1010
  • debian/gnuboat-puppet.postinst

    r1bdb08d r90530ec  
    1 
    2 #!/bin/bash
     1#!/bin/sh
    32
    43set -e
    54
    65# Run puppet, if wanted by the user (in upgrade case)
    7 if [ "$1" = configure" ]; then
    8         if [ ! -z "$2"]; then
     6# Not possible, as this apt instance locks the database
     7# and therefore the puppet apt instance is hanging
     8#if [ "$1" = configure ]; then
     9#       if [ ! -z $2 ]; then
    910                # it's an upgrade
    1011                # Source debconf library.
    11                 . /usr/share/debconf/confmodule
    12 
    13                 db_get gnuboat-puppet/runpuppetagent
    14                 if [ "$RET" = "true" ]; then
    15                         puppet apply --test --config /etc/puppet/gnuboat_puppet.conf --environment gnuboat /etc/puppet/environments/gnuboat/manifests/ || true
    16                 fi
    17                
    18         fi
    19 fi
     12#               . /usr/share/debconf/confmodule
     13#
     14#               db_get gnuboat-puppet/runpuppetagent
     15#               if [ "$RET" = "true" ]; then
     16#                       puppet apply --test --config /etc/puppet/gnuboat_puppet.conf --environment gnuboat /etc/puppet/environments/gnuboat/manifests/ || true
     17#               fi
     18#       fi
     19#fi
     20echo 'To apply the GNUBoat config to your system run "puppet apply --test --config /etc/puppet/gnuboat_puppet.conf --environment gnuboat /etc/puppet/environments/gnuboat/manifests/"'
    2021
    2122#DEBHELPER#
  • debian/python3-gnuboat.postinst

    • Property mode changed from 120000 to 100644
    r1bdb08d r90530ec  
    1 python2-gnuboat.postinst
     1#!/bin/sh
     2set -e
     3
     4mkdir -p /var/spool/gnuboat
     5mkdir -p /var/lib/gnuboat
     6mkdir -p /var/log/gnuboat
     7chown www-data:www-data /var/spool/gnuboat /var/lib/gnuboat /var/log/gnuboat
     8
     9
     10#DEBHELPER#
     11
     12exit 0
  • debian/python3-gnuboat.prerm

    • Property mode changed from 120000 to 100644
    r1bdb08d r90530ec  
    1 python2-gnuboat.prerm
     1#!/bin/sh
     2set -e
     3
     4DIR_DATA="/var/lib/gnuboat/"
     5DIR_LOG="/var/log/gnuboat/"
     6DIR_SPOOL="/var/spool/gnuboat"
     7
     8rm -R "${DIR_SPOLL}"
     9
     10if [ "$(ls -A ${DIR_DATA})" ]; then
     11        # do not remove the data directory
     12        echo "Your data directory (${DIR_DATA}) is not empty. Leaving the data directory untouched!"
     13else
     14        rm -R "${DIR_DATA}"
     15fi
     16
     17if [ "$(ls -A ${DIR_LOG})" ]; then
     18        # do not remove the data directory
     19        echo "Your log directory (${DIR_LOG}) is not empty. Leaving the log directory untouched!"
     20else
     21        rm -R "${DIR_LOG}"
     22fi
     23
     24#DEBHELPER#
     25
     26exit 0
Note: See TracChangeset for help on using the changeset viewer.