From a42a93094b8ef08f0240a36068ecf8cea683fc1f Mon Sep 17 00:00:00 2001 From: Duco Dokter Date: Wed, 12 Mar 2014 15:44:01 +0100 Subject: [PATCH] fixes for 1.8.1 --- DEBIAN/control | 2 +- Makefile | 2 +- modules/app/includes | 33 ++++++++++++++++++++++++--------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/DEBIAN/control b/DEBIAN/control index 61f2780..78f199e 100644 --- a/DEBIAN/control +++ b/DEBIAN/control @@ -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. diff --git a/Makefile b/Makefile index 1172cde..1df8409 100755 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/modules/app/includes b/modules/app/includes index 0f11f1f..bb5b2bb 100755 --- a/modules/app/includes +++ b/modules/app/includes @@ -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