Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions hack/package/rpm/scripts/after-install.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#!/usr/bin/env bash
if [ "$1" -eq 1 ] ; then
systemctl preset pouch > /dev/null 2>&1

systemctl preset pouch > /dev/null 2>&1
fi
if ! getent group pouch > /dev/null; then
groupadd --system pouch
groupadd --system pouch
fi

if [ ! -d "/var/lib/pouch-lxcfs" ] ; then
mkdir -p /var/lib/pouch-lxcfs
fi
fi

BASEDIR="$( dirname "$0" )/../../../.."
COMPLETION_FILE="$BASEDIR/contrib/completion/bash/pouch"
DEST="/usr/share/bash-completion/completions"

if [ -f "$COMPLETION_FILE" ];then
cp "$COMPLETION_FILE" "$DEST"
fi
5 changes: 5 additions & 0 deletions hack/package/rpm/scripts/after-remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ systemctl daemon-reload > /dev/null 2>&1
if [ "$1" -ge 1 ] ; then
systemctl try-restart pouch > /dev/null 2>&1
fi

COMPLETION_FILE="contrib/completion/bash/pouch"
if [ -f "$COMPLETION_FILE" ];then
rm -f $COMPLETION_FILE
fi