[Groonga-commit] droonga/droonga-http-server at c9f32c5 [master] Redefine run_as_user() to make it accept multiple arguments

Back to archive index

KITAITI Makoto null+****@clear*****
Sat Jan 16 17:39:16 JST 2016


KITAITI Makoto	2016-01-16 17:39:16 +0900 (Sat, 16 Jan 2016)

  New Revision: c9f32c54155e5196f540f56531d63e915c404c3e
  https://github.com/droonga/droonga-http-server/commit/c9f32c54155e5196f540f56531d63e915c404c3e

  Merged 0f9441b: Merge pull request #13 from KitaitiMakoto/systemd

  Message:
    Redefine run_as_user() to make it accept multiple arguments
    
    See https://github.com/droonga/droonga-http-server/pull/13#discussion_r49740459

  Modified files:
    install.sh

  Modified: install.sh (+1 -5)
===================================================================
--- install.sh    2016-01-13 23:55:05 +0900 (080bc61)
+++ install.sh    2016-01-16 17:39:16 +0900 (241e134)
@@ -121,11 +121,7 @@ prepare_user() {
 }
 
 run_as_user() {
-  sudo -u $USER /bin/bash -c "
-  export HOME=/home/$USER
-  export PATH=$NODEJS_BASE_DIR/bin:$PATH
-  $1
-  "
+  sudo -u $USER -H env PATH="$NODEJS_BASE_DIR/bin:$PATH" "$@"
 }
 
 install_nodejs() {
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index