Commit a9750078629cc2fcb6208d67874552bb20dc677c

Authored by Antonio Terceiro
1 parent 131516d4

initscript: don't assume $HOME = $NOOSFERO_DIR

In cases where the `noosfero` user has been created by hand before
installing the package, it will probably not have /usr/share/noosfero as
its home directory.
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
etc/init.d/noosfero
... ... @@ -54,10 +54,10 @@ fi
54 54 ######################
55 55  
56 56 main_script() {
57   - cd $NOOSFERO_DIR
58 57 if [ "$NOOSFERO_USER" != "$USER" ]; then
59   - su $NOOSFERO_USER -l -c "./script/production $1"
  58 + su $NOOSFERO_USER -l -c "cd $NOOSFERO_DIR && ./script/production $1"
60 59 else
  60 + cd $NOOSFERO_DIR
61 61 ./script/production $1
62 62 fi
63 63 }
... ...