tidy up init script with unneccesary sed

This commit is contained in:
sparklyballs 2017-06-06 03:09:38 +01:00
parent 28aa527494
commit 847fc435f8
3 changed files with 4 additions and 9 deletions

View File

@ -1,2 +1,2 @@
21 02 * * * /bin/sh /defaults/script.sh
21 02 * * * /bin/bash /defaults/script.sh

View File

@ -7,7 +7,9 @@ FOLDER_MAKE="/backup/${FOLDER_DATE}"
REPO_USER=${REPO_USER:-linuxserver}
# delete folders older than 20 days
for i in $(find /backup/ -maxdepth 1 -type d -mtime +20 -print); do echo -e "Deleting directory $i";rm -rf $i; done
for i in $(find /backup/ -maxdepth 1 -type d -mtime +20 -print); do
echo -e "Deleting directory $i";rm -rf $i
done
# make today's folders
if [ -d "${FOLDER_MAKE}" ]; then

View File

@ -4,13 +4,6 @@
[[ ! -e /config/backup ]] && \
cp /defaults/backup /config/backup
# set user repo
if [[ -z $USER_REPO ]]; then
USER_REPO="linuxserver"
fi
sed -i "s/REPO_USER=\".*\"/REPO_USER=\"${USER_REPO}\"/g" /defaults/script.sh
# set cron job
crontab /config/backup