Skip to content

Commit

Permalink
Merge pull request #5 from htpcBeginner/master
Browse files Browse the repository at this point in the history
FI Forked from branch
  • Loading branch information
TommyE123 committed Feb 14, 2018
2 parents 252cea2 + 26451c4 commit f9ce344
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lazylibrarian/lazylibrarian-default-update.sh
Expand Up @@ -3,17 +3,18 @@
# Author: TommyE123
# Publisher: http://www.htpcbeginner.com

# DO NOT EDIT ANYTHING UNLESS YOU KNOW WHAT YOU ARE DOING.

echo -e "${YELLOW}--->Updating Default file...$ENDCOLOR"

# [required] user or uid of account to run the program as:
sudo sed -i "s@RUN_AS=\$USER@RUN_AS=$UNAME@g" /etc/default/$APPNAME || { echo -e $RED'Replacing RUN_AS failed.'$ENDCOLOR ; exit 1; }
sudo sed -i "s@RUN_AS=\$USER@RUN_AS=$UNAME@g" /etc/default/$APPNAME || { echo -e "${RED}Replacing RUN_AS failed.$ENDCOLOR" ; exit 1; }

# [required] set path where lazylibrarian is installed:
sudo sed -i "s@APP_PATH=/opt/LazyLibrarian@APP_PATH=$APPPATH@g" /etc/default/$APPNAME || { echo -e "${RED}Replacing APP_PATH failed.$ENDCOLOR" ; exit 1; }

# [optional] full path to the configuration file of your choice;
sudo sed -i "s@CONFIG=@CONFIG=$APPSETTINGS@g" /etc/default/$APPNAME || { echo -e $RED'Replacing CONFIG failed.'$ENDCOLOR ; exit 1; }
sudo sed -i "s@CONFIG=@CONFIG=$APPSETTINGS@g" /etc/default/$APPNAME || { echo -e "${RED}Replacing CONFIG failed.$ENDCOLOR" ; exit 1; }

# [optional] full path to the folder to store data (databases/thumbs) in;
sudo sed -i "s@DATADIR=@DATADIR=$APPPATH/data@g" /etc/default/$APPNAME || { echo -e $RED'Replacing DATADIR failed.'$ENDCOLOR ; exit 1; }
sudo sed -i "s@DATADIR=@DATADIR=$APPPATH/data@g" /etc/default/$APPNAME || { echo -e "${RED}Replacing DATADIR failed.$ENDCOLOR" ; exit 1; }

echo 'Updated Default file with new values'

0 comments on commit f9ce344

Please sign in to comment.