mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 21:03:19 -07:00
Add PATH variable to cron file
This commit is contained in:
parent
508e7dd184
commit
35fea18230
1 changed files with 2 additions and 1 deletions
|
@ -287,7 +287,7 @@ configure_cron() {
|
||||||
#changes go here
|
#changes go here
|
||||||
schedule=$(grep "cron.daily" crontab)
|
schedule=$(grep "cron.daily" crontab)
|
||||||
if [ -z "$schedule" ]; then
|
if [ -z "$schedule" ]; then
|
||||||
schedule="0 4 * * * "
|
schedule="0 4 * * * "
|
||||||
else
|
else
|
||||||
schedule=${schedule%%root*}
|
schedule=${schedule%%root*}
|
||||||
fi
|
fi
|
||||||
|
@ -312,6 +312,7 @@ configure_cron() {
|
||||||
|
|
||||||
save_cronjob() {
|
save_cronjob() {
|
||||||
CONFIGTEMP=$(mktemp /tmp/plexupdate.XXX)
|
CONFIGTEMP=$(mktemp /tmp/plexupdate.XXX)
|
||||||
|
echo "$(grep "PATH=" /etc/crontab)" >> $CONFIGTEMP
|
||||||
echo "#minute hour mday month wday who command" >> $CONFIGTEMP
|
echo "#minute hour mday month wday who command" >> $CONFIGTEMP
|
||||||
echo "$1" >> $CONFIGTEMP
|
echo "$1" >> $CONFIGTEMP
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue