Project

General

Profile

Feature #764 ยป 0001-Updated-Debian-package-specs-for-version-0.1.patch

Jochen Schalanda, 03/20/2011 12:09 PM

View differences:

extra/debian/changelog
foreman-proxy (0.1-1) unstable; urgency=low
* First public release
-- Jochen Schalanda <jochen@schalanda.name> Sun, 20 Mar 2011 14:58:00 +0100
foreman-proxy (0.0.2-1) unstable; urgency=low
* Initial release
extra/debian/default
# Defaults for smart-proxy initscript
# sourced by /etc/init.d/foreman-proxy
DAEMON_USER="foreman-proxy:foreman-proxy"
DAEMON_USER="foreman:foreman"
DAEMON_HOME="/usr/share/foreman-proxy"
DAEMON_ARGS=""
extra/debian/init.d
do_start()
{
PIDFILE_DIR=$(dirname $PIDFILE)
if [ ! -x $PIDFILE_DIR ]
then
if [ ! -x $PIDFILE_DIR ]; then
mkdir -p $PIDFILE_DIR && chown $DAEMON_USER $PIDFILE_DIR
fi
TMP_DIR=/usr/share/$NAME/tmp
if [ ! -x $TMP_DIR ]; then
mkdir -p $TMP_DIR && chown $DAEMON_USER $TMP_DIR
fi
# Return
# 0 if daemon has been started
# 1 if daemon was already running
extra/debian/postinst
set -e
USERNAME="foreman"
GROUPNAME="foreman"
FOREMAN_HOME="/usr/share/foreman-proxy"
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
......
case "$1" in
configure)
getent group foreman-proxy >/dev/null || groupadd -r foreman-proxy
getent passwd foreman-proxy >/dev/null || \
useradd -r -g foreman-proxy -d /usr/share/foreman-proxy -s /usr/sbin/nologin -c "Foreman Smart-Proxy" foreman-proxy
chown 'foreman-proxy:foreman-proxy' '/usr/share/foreman-proxy/logs'
chown 'foreman-proxy:foreman-proxy' '/var/log/foreman-proxy'
getent group $GROUPNAME >/dev/null || groupadd -r $GROUPNAME
getent passwd $USERNAME >/dev/null || \
useradd -r -g $GROUPNAME -d $FOREMAN_HOME -s /usr/sbin/nologin -c "Foreman" $USERNAME
mkdir -p "$FOREMAN_HOME/tmp"
chown $USERNAME:$GROUPNAME "$FOREMAN_HOME/tmp"
chown $USERNAME:$GROUPNAME "$FOREMAN_HOME/logs"
chown $USERNAME:$GROUPNAME "/var/log/foreman-proxy"
;;
abort-upgrade|abort-remove|abort-deconfigure)
    (1-1/1)