From 6b40c1ca7f7aa31a16972c98f307ab57f32b70cb Mon Sep 17 00:00:00 2001 From: Sebastian Haderecker Date: Thu, 16 May 2019 01:09:50 +0000 Subject: [PATCH] HPFEEDS: Command line option - OptIn script accepts config file as argument (--conf=hpfeeds.cfg) - Current config is written to /data/ews/conf/hpfeeds.cfg --- bin/hpfeeds_optin.sh | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/bin/hpfeeds_optin.sh b/bin/hpfeeds_optin.sh index 5310e401..fc6792bf 100755 --- a/bin/hpfeeds_optin.sh +++ b/bin/hpfeeds_optin.sh @@ -67,6 +67,24 @@ mySECRET="secret" myFORMAT="json" } +function fuWRITETOFILE () { +if [ -f '/data/ews/conf/hpfeeds.cfg' ]; then + echo "Creating backup of current config" + mv /data/ews/conf/hpfeeds.cfg /data/ews/conf/hpfeeds.cfg.old +fi +echo "Storing new config in /data/ews/conf/hpfeeds.cfg" +cat >> /data/ews/conf/hpfeeds.cfg <