Changeset 29910 in project


Ignore:
Timestamp:
10/12/13 12:06:19 (8 years ago)
Author:
Timusan
Message:

Added checks for the presence of the log directory and the configuration file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/spiffy-init-script

    r29906 r29910  
    1515DATE_FORMAT="+%Y-%m-%d %H:%M:%S"
    1616
     17CONFIG_FILE="/usr/local/libexec/spiffy.scm"
     18LOG_DIR="/var/log/spiffy"
     19
    1720spiffy_start () {
     21    if [ ! -d "$LOG_DIR" ]; then
     22      echo "Log directory \"$LOG_DIR\" does not exist."
     23      exit 0
     24    fi
     25
     26    if [ ! -f "$CONFIG_FILE" ]; then
     27       echo "Cannot find configuration file. Please create the following file: \"$CONFIG_FILE\""
     28       exit 0
     29    fi
     30
    1831    echo "Starting spiffy..."
    1932    echo "start: " `date "$DATE_FORMAT"` >> /var/log/spiffy/start-stop.log
Note: See TracChangeset for help on using the changeset viewer.