From 11bb2848c8cd2c9de6b7f40629c7ee5ef5c36c08 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 22 Oct 2019 23:26:51 +1100 Subject: [PATCH] Use variable for mods dir --- mods/ansitex_export.js | 4 ++-- mods/ansitex_save.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ansitex_export.js b/mods/ansitex_export.js index 48a701c..027740c 100644 --- a/mods/ansitex_export.js +++ b/mods/ansitex_export.js @@ -151,7 +151,7 @@ function msgBaseExport(msgbase) { } // Check if the signature is good - result = system.exec('gpgv --keyring /opt/sbbs/mods/keys/pubring.kbx '+system.temp_dir+'videotex.gpg'); + result = system.exec('gpgv --keyring '+system.mods_dir+'/keys/pubring.kbx '+system.temp_dir+'videotex.gpg'); if (result !== 0 ) { log(LOG_ERROR,'! ERROR: Invalid Signature for message offset ['+i+'] in ['+msgbase.file+']'); @@ -162,7 +162,7 @@ function msgBaseExport(msgbase) { file_remove(system.temp_dir+'videotex.tex') // Check that the signature is allowed to author the frames - result = system.exec('gpg --homedir /opt/sbbs/mods/keys --batch --status-fd 3 -o '+system.temp_dir+'videotex.tex '+system.temp_dir+'videotex.gpg 3>'+system.temp_dir+'videotex.log'); + result = system.exec('gpg --homedir '+system.mods_dir+'/keys --batch --status-fd 3 -o '+system.temp_dir+'videotex.tex '+system.temp_dir+'videotex.gpg 3>'+system.temp_dir+'videotex.log'); if (result !== 0 ) { log(LOG_ERROR,'! ERROR: Failed to extract message offset ['+i+'] in ['+msgbase.file+']'); diff --git a/mods/ansitex_save.js b/mods/ansitex_save.js index fe85171..a8587ad 100644 --- a/mods/ansitex_save.js +++ b/mods/ansitex_save.js @@ -97,7 +97,7 @@ if (send == 1 && options.gpg_key) { if (file_exists(file+'.gpg')) file_remove(file+'.gpg') - result = system.exec('gpg --homedir /opt/sbbs/mods/keys --batch --local-user '+options.gpg_key+' -s '+file); + result = system.exec('gpg --homedir '+system.mods_dir+'/keys --batch --local-user '+options.gpg_key+' -s '+file); w = new File(file+'.gpg'); if (w.open('r')) {