From fefee3c3eaef087742169d666a9561928b7b9635 Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Sun, 19 May 2024 13:50:51 +0300 Subject: [PATCH] [~] Refactor --- dotfiles/.local/bin/commands | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/dotfiles/.local/bin/commands b/dotfiles/.local/bin/commands index 043cbdd..9e91a50 100755 --- a/dotfiles/.local/bin/commands +++ b/dotfiles/.local/bin/commands @@ -1283,16 +1283,15 @@ server { location_section, )) - subprocess.check_call( - r''' - exec nginx -c $CONF_DIR/nginx.conf -p $DATA_DIR -g "daemon off;" - ''', - env=dict( - CONF_DIR=CONF_DIR, - DATA_DIR=DATA_DIR, - #APP_DIR=APP_DIR, - ), - shell=True, + os.execv( + 'nginx', + [ + 'nginx', + '-c', + os.path.join(CONF_DIR, 'nginx.conf'), + '-p', + '-g', 'daemon off;', + ], ) def pass_ssh_osx(argv):