Format shell scripts
Fix flags order
This commit is contained in:
parent
6c2e547808
commit
8b3e09d41c
24 changed files with 1487 additions and 1499 deletions
|
@ -1,21 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
## Use config
|
||||
backup_folder=~/libretime_backup/
|
||||
else
|
||||
## User arg as config
|
||||
backup_folder=$1
|
||||
if [ -z "$1" ]; then
|
||||
## Use config
|
||||
backup_folder=~/libretime_backup/
|
||||
else
|
||||
## User arg as config
|
||||
backup_folder=$1
|
||||
fi
|
||||
|
||||
|
||||
airtime_conf_path=/etc/airtime/airtime.conf
|
||||
uploads_folder=/srv/airtime/stor/
|
||||
|
||||
psdl_db=$(grep dbname ${airtime_conf_path} | awk '{print $3;}' )
|
||||
psql_user=$(grep dbuser ${airtime_conf_path} | awk '{print $3;}' )
|
||||
psql_password=$(grep dbpass ${airtime_conf_path} | awk '{print $3;}' )
|
||||
psdl_db=$(grep dbname ${airtime_conf_path} | awk '{print $3;}')
|
||||
psql_user=$(grep dbuser ${airtime_conf_path} | awk '{print $3;}')
|
||||
psql_password=$(grep dbpass ${airtime_conf_path} | awk '{print $3;}')
|
||||
|
||||
## Remove old backup
|
||||
rm -rf $backup_folder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue