Allow specify port in deploy script
This commit is contained in:
parent
a4e1bb74cf
commit
2666206b45
@ -2,6 +2,7 @@
|
||||
|
||||
DEPLOY_HOST=$1
|
||||
DEPLOY_ADDRESS=$2
|
||||
DEPLOY_PORT=$3
|
||||
|
||||
if [ -z $DEPLOY_HOST ]; then
|
||||
exit 1
|
||||
@ -12,7 +13,7 @@ nixos-rebuild switch \
|
||||
-I nixos-config=hosts/${DEPLOY_HOST}/configuration.nix \
|
||||
"
|
||||
|
||||
if [ -z $DEPLOY_ADDRESS ]; then
|
||||
if [ -z $DEPLOY_ADDRESS ] || [ $DEPLOY_ADDRESS = "-" ]; then
|
||||
DEPLOY_ADDRESS="clerie@${DEPLOY_HOST}.net.clerie.de"
|
||||
fi
|
||||
|
||||
@ -24,4 +25,8 @@ if [ $DEPLOY_ADDRESS != "localhost" ]; then
|
||||
"
|
||||
fi
|
||||
|
||||
if [ -n "$DEPLOY_PORT" ]; then
|
||||
cmd="NIX_SSHOPTS=\"-p $DEPLOY_PORT\" ${cmd}"
|
||||
fi
|
||||
|
||||
eval ${cmd}
|
||||
|
Loading…
Reference in New Issue
Block a user