Remove configuration files if they already exist

This commit is contained in:
Jose Diaz-Gonzalez committed 2015-01-16 16:52:50 -05:00
1 parent 2b9a31f06d
commit d9026a9974
1 file changed
+3
+3
View File
@@ -5,10 +5,13 @@ case "$1" in
install) install)
INIT_CONF="/etc/init/dokku-installer.conf" INIT_CONF="/etc/init/dokku-installer.conf"
NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf" NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf"
rm -f $INIT_CONF
touch $INIT_CONF touch $INIT_CONF
echo 'start on runlevel [2345]' >> $INIT_CONF echo 'start on runlevel [2345]' >> $INIT_CONF
echo 'exec /root/dokku/contrib/dokku-installer.rb selfdestruct' >> $INIT_CONF echo 'exec /root/dokku/contrib/dokku-installer.rb selfdestruct' >> $INIT_CONF
rm -f $NGINX_CONF
touch $NGINX_CONF touch $NGINX_CONF
echo 'upstream dokku-installer { server 127.0.0.1:2000; }' >> $NGINX_CONF echo 'upstream dokku-installer { server 127.0.0.1:2000; }' >> $NGINX_CONF
echo 'server {' >> $NGINX_CONF echo 'server {' >> $NGINX_CONF