Created
April 18, 2017 22:26
-
-
Save yonglai/4225f43d3cb0c5a1edf3057cd98b9a66 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
echo create tibco_ems.service | |
touch /etc/systemd/system/tibco_ems.service | |
chmod 644 /etc/systemd/system/tibco_ems.service | |
cat <<EOT >> /etc/systemd/system/tibco_ems.service | |
[Unit] | |
Description=Tibco EMS server | |
After=syslog.target network.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/bin/tibco_ems.sh | |
[Install] | |
WantedBy=multi-user.target | |
EOT | |
echo create tibco_ems.sh script | |
touch /bin/tibco_ems.sh | |
chown vagrant /bin/tibco_ems.sh | |
chmod 750 /bin/tibco_ems.sh | |
cat <<EOT >> /bin/tibco_ems.sh | |
#! /bin/bash | |
su -l vagrant -c '/home/vagrant/tibco/ems/8.2/bin/tibemsd64 &' | |
EOT | |
echo enable tibco_ems.service | |
systemctl daemon-reload | |
systemctl enable tibco_ems.service | |
systemctl start tibco_ems.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment