Skip to content

Commit

Permalink
taking -self-ip as -bind ip
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekpandey14 committed Mar 9, 2017
1 parent e2bdbff commit 0396da8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions scripts/start_mayaserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

set -e

SELF_IPV4=$1

if [ $# -ne "" ]; then
SELF_IP4=127.0.0.1
fi

echo "Setup Mayaserver Daemon ..."

# Place systemd service template for Mayaserver
sudo cp /etc/maya.d/templates/mayaserver.service.tmpl /etc/systemd/system/mayaserver.service

# Replace the placeholders with actual values
sudo sed -e "s|__SELF_IPV4__|$SELF_IPV4|g" -i /etc/systemd/system/mayaserver.service

echo "Starting Mayaserver service ..."

sudo systemctl enable mayaserver.service
Expand Down
2 changes: 1 addition & 1 deletion templates/mayaserver.service.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Description=Mayaserver Daemon
[Service]
Environment=GOMAXPROCS=2
Restart=on-failure
ExecStart=/usr/bin/mayaserver up &>mserver.log
ExecStart=/usr/bin/mayaserver up -bind=__SELF_IPV4__ &>mserver.log
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGTERM

Expand Down

0 comments on commit 0396da8

Please sign in to comment.