Clarify that -i can be used to update script links, not jistmake a new config.
This commit is contained in:
parent
80ae228e8c
commit
340e5b7973
23
lehook.sh
23
lehook.sh
|
@ -3,6 +3,17 @@ DIR=$HOME/.lehook
|
||||||
configfile=$DIR/config
|
configfile=$DIR/config
|
||||||
VALIDMODES="deploy|renew|generate|test"
|
VALIDMODES="deploy|renew|generate|test"
|
||||||
|
|
||||||
|
function doinstall() {
|
||||||
|
echo "Creating hardlinks in $DIR..."
|
||||||
|
cp -f $0 $DIR/lehook.sh
|
||||||
|
for x in pre post deploy; do
|
||||||
|
ln -f $DIR/lehook.sh $DIR/lehook-${x}.sh
|
||||||
|
done
|
||||||
|
ln -f $DIR/lehook.sh /usr/local/bin/lehook.sh
|
||||||
|
echo "Install complete. Files are in $DIR."
|
||||||
|
echo "Main binary in /usr/local/bin/lehook.sh."
|
||||||
|
}
|
||||||
|
|
||||||
function doinit() {
|
function doinit() {
|
||||||
mkdir -p $DIR
|
mkdir -p $DIR
|
||||||
if [[ ! -e $configfile ]]; then
|
if [[ ! -e $configfile ]]; then
|
||||||
|
@ -29,14 +40,8 @@ EOF
|
||||||
else
|
else
|
||||||
echo "$configfile already exists."
|
echo "$configfile already exists."
|
||||||
fi
|
fi
|
||||||
echo "Creating hardlinks in $DIR..."
|
doinstall
|
||||||
cp -f $0 $DIR/lehook.sh
|
echo "Init complete"
|
||||||
for x in pre post deploy; do
|
|
||||||
ln -f $DIR/lehook.sh $DIR/lehook-${x}.sh
|
|
||||||
done
|
|
||||||
ln -f $DIR/lehook.sh /usr/local/bin/lehook.sh
|
|
||||||
echo "Init complete. Files are in $DIR."
|
|
||||||
echo "Main binary in /usr/local/bin/lehook.sh."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function out() {
|
function out() {
|
||||||
|
@ -99,7 +104,7 @@ function usage() {
|
||||||
echo
|
echo
|
||||||
echo " -c Cron mode - only output if something is done."
|
echo " -c Cron mode - only output if something is done."
|
||||||
echo " -f Push out certs even if they haven't changed."
|
echo " -f Push out certs even if they haven't changed."
|
||||||
echo " -i Iniitalise new config file in $configfile"
|
echo " -i Install files in $DIR and generate config if it doesn't exist."
|
||||||
echo " -r remotes Only push certs to the given remotes [default: $remotes]"
|
echo " -r remotes Only push certs to the given remotes [default: $remotes]"
|
||||||
echo " -s services Only restart the given services [default: $services]"
|
echo " -s services Only restart the given services [default: $services]"
|
||||||
echo " -d domain Only push cert for given domain [default: $domains]."
|
echo " -d domain Only push cert for given domain [default: $domains]."
|
||||||
|
|
Loading…
Reference in New Issue