hi,
I see many scipts with that : #, I would like to know if we need to put it in the script or if it is only for explanation?
exemple:
#Check if date is at least 2016 to validade VPN certificates
YEAR=`date "+%Y"`
while [ $YEAR -le 2016 ]; do
/bin/echo "We do not have a valid date.\n" >> $LOGFILE
/etc/init.d/ntpclient stop
/usr/sbin/ntpclient -s -h pool.ntp.org
/bin/sleep 2
/etc/init.d/ntpclient start
NOW=$(date +"%H:%M, %d-%m-%Y")
YEAR=`date "+%Y"`
You don't have to put "# and text to end of line" in the scripts - unless it is within quotes such as"#" or '#'...
# means the line is a comment, usually to explaine the following code