Detect fails in setup script
Posted
by
Lai Yu-Hsuan
on Server Fault
See other posts from Server Fault
or by Lai Yu-Hsuan
Published on 2012-03-23T20:33:50Z
Indexed on
2012/03/23
23:32 UTC
Read the original article
Hit count: 305
I wrote a setup script to install my prefered programs and settings after I got a new server.
apt-get install git
git clone http://[email protected] .vim
ln -s .vimrc .vim/vimrc
...
But if something wrong happens during setup, how can I interrupt the setup script, and log the error(s)? For example, if github
server is down, it's obviously useless to create a symbolic link to non-existed vimrc
.
(or you have a better approach to initialize a server?)
© Server Fault or respective owner