#============================================================================== # Section: Configuration #============================================================================== if [ -r $HOME/.sns/sns.conf ]; then source $HOME/.sns/sns.conf else init_default_config fi if [ "$ENCRYPTION" == "TRUE" ]; then if [ -z "$ENC_KEY" ]; then ERR_NO_KEY="TRUE" ENCRYPTION="FALSE" fi command -v openssl >/dev/null 2>&1 || { ERR_NO_SSL="TRUE"; ENCRYPTION="FALSE"; } fi if [ "$ENCRYPTION" == "TRUE" ]; then PROD_STR="Simple Note System (Encryption Enabled)" EXT="$EXT.enc" if [ ! -d ~/.sns/tmp ]; then mkdir -p ~/.sns/tmp fi fi echo "$PROD_STR, $VER_STR" if [ -n "$ERR_NO_SSL" ]; then echo >&2 " Warning: OpenSSL not installed. Encryption disabled." fi if [ -n "$ERR_NO_KEY" ]; then echo " Warning: No encryption key was provided. Encryption disabled." fi if [ -n "$ERR_NO_SSL" -o -n "$ERR_NO_KEY" ]; then pause fi #============================================================================== # End Section: Read Configuration #==============================================================================