Last active
March 4, 2019 13:42
-
-
Save denchistyakov/3bef5388cc8c72222672bec8b8025c6d to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
### BEGIN INIT INFO | |
# Provides: autostart.script | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: | |
# Short-Description: Install and start init-teamcity-agent-instance | |
# Description: Run init-teamcity-agent-instance install if this | |
# need and init-teamcity-agent-instance start. | |
### END INIT INFO | |
set -e | |
LOG=/var/log/autostart.script.steps.log | |
touch $LOG | |
echo "0" >> $LOG | |
case "$1" in | |
start) | |
echo "1" >> $LOG | |
echo "Install all stuff, if it`s does`nt installed yet. First run." | |
if [ ! -f /var/run/init-teamcity-agent-instance.installed ]; then | |
echo "2" >> $LOG | |
service init-teamcity-agent-instance install > /var/log/init-teamcity-agent-instance.install.log | |
echo "5" >> $LOG | |
fi | |
echo "6" >> $LOG | |
service init-teamcity-agent-instance start > /var/log/init-teamcity-agent-instance.start.log | |
echo "9" >> $LOG | |
;; | |
stop) | |
;; | |
esac | |
echo "10" >> $LOG | |
exit 0 |
This file contains hidden or 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/sh | |
set -e | |
export DEBIAN_FRONTEND="noninteractive" | |
LOG=/var/log/autostart.script.steps.log | |
case "$1" in | |
install) | |
echo "3" >> $LOG | |
echo "Installing all teamcity agent and other stuff" | |
bash /scripts/PORTOVM/common/apt-update.sh | |
bash /scripts/PORTOVM/common/yandex-pip.sh | |
bash /scripts/PORTOVM/junk/dench/teamcity-agent.sh | |
bash /scripts/PORTOVM/junk/dench/docker.sh | |
bash /scripts/PORTOVM/junk/dench/virtualenv.sh | |
bash /scripts/PORTOVM/junk/dench/nvm.sh | |
bash /scripts/PORTOVM/junk/dench/unbound-config-local64.sh | |
apt-get install -y telnet vim | |
pip install awscli | |
pip install citclient | |
/etc/init.d/teamcity-agent-qemu-service install | |
touch /var/run/init-teamcity-agent-instance.installed | |
echo "4" >> $LOG | |
;; | |
start) | |
echo "7" >> $LOG | |
/etc/init.d/teamcity-agent-qemu-service start | |
echo "8" >> $LOG | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment