Skip to content

Commit

Permalink
fixes for 1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Duco Dokter committed Mar 12, 2014
1 parent 411c2aa commit a42a930
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DEBIAN/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Section: base
Installed-Size: 666
Maintainer: Duco Dokter
Architecture: all
Version: 1.8.0
Version: 1.8.1
Depends: sudo (>= 1.7.2), debconf (>= 0.2.26)
Description: Appie application maintenance app.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dist: struct
chmod 0440 build/$(PACKAGE)/etc/sudoers.d/appie
chmod a+x build/$(PACKAGE)/usr/bin/appie
cp -r DEBIAN build/$(PACKAGE)
cd build; dpkg-deb --build $(PACKAGE)
cd build; fakeroot dpkg-deb --build $(PACKAGE)
cp build/$(PACKAGE).deb dist

struct:
Expand Down
33 changes: 24 additions & 9 deletions modules/app/includes
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,41 @@ createEnv() {
createUser $TGT "$COMM" $APP $USR

if [ ! -d $TGT ]; then
mkdir -p -m 2770 $TGT
sudo chown "app-$APP-$USR":"app-$APP-$USR" $TGT
mkdir -p -m 2775 $TGT
sudo chown "app-$APP-$USR":"app-$APP-$USR" $TGT
fi

PROFILE_TMP=/tmp/profile-$APP-$USR

echo "# BEGIN general settings" > $PROFILE_TMP
echo "# Check on virtual env" >> $PROFILE_TMP
echo 'if [ -e $HOME/bin/activate ]; then' >> $PROFILE_TMP
echo ' . $HOME/bin/activate' >> $PROFILE_TMP
echo 'fi' >> $PROFILE_TMP
echo "" >> $PROFILE_TMP

echo "" >> $PROFILE_TMP
echo "# Check release info" >> $PROFILE_TMP
echo "RELEASE=" >> $PROFILE_TMP
echo 'if [ -e $HOME/app-release ]; then' >> $PROFILE_TMP
echo ' RELEASE=`cat $HOME/app-release|head -1`' >> $PROFILE_TMP
echo ' RELEASE=[$RELEASE]' >> $PROFILE_TMP
echo 'fi' >> $PROFILE_TMP
echo "" >> $PROFILE_TMP

echo "# BEGIN general settings" >> $PROFILE_TMP
echo "#" >> $PROFILE_TMP
echo "export APPLICATION=$APP" >> $PROFILE_TMP
echo "export ENVIRONMENT=$USR" >> $PROFILE_TMP

if [ "$USR" = "tst" ]; then
echo "export PACKAGES='unstable testing stable'" >> $PROFILE_TMP
echo 'export PS1="\[\e[1;37;42m\]$ENVIRONMENT\[\e[0m\e[34m\] $APPLICATION\[\e[0m\]@\w$ "' >> $PROFILE_TMP
echo "export PACKAGES='unstable testing stable'" >> $PROFILE_TMP
echo 'export PS1="\[\e[1;37;42m\]$ENVIRONMENT\[\e[0m\e[34m\] $APPLICATION$RELEASE\[\e[0m\]@\w$ "' >> $PROFILE_TMP
elif [ "$USR" = "acc" ]; then
echo "export PACKAGES='testing stable'" >> $PROFILE_TMP
echo 'export PS1="\[\e[1;37;45m\]$ENVIRONMENT\[\e[0m\e[34m\] $APPLICATION\[\e[0m\]@\w$ "' >> $PROFILE_TMP
echo "export PACKAGES='testing stable'" >> $PROFILE_TMP
echo 'export PS1="\[\e[1;37;45m\]$ENVIRONMENT\[\e[0m\e[34m\] $APPLICATION$RELEASE\[\e[0m\]@\w$ "' >> $PROFILE_TMP
elif [ "$USR" = "prd" ]; then
echo "export PACKAGES=stable" >> $PROFILE_TMP
echo 'export PS1="\[\e[1;37;41m\]$ENVIRONMENT\[\e[0m\e[34m\] $APPLICATION\[\e[0m\]@\w$ "' >> $PROFILE_TMP
echo "export PACKAGES=stable" >> $PROFILE_TMP
echo 'export PS1="\[\e[1;37;41m\]$ENVIRONMENT\[\e[0m\e[34m\] $APPLICATION$RELEASE\[\e[0m\]@\w$ "' >> $PROFILE_TMP
fi

echo "#" >> $PROFILE_TMP
Expand Down

0 comments on commit a42a930

Please sign in to comment.