mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-18 00:54:26 -04:00
fix crontab symlinking to use glob instead of ls for iteration
This commit is contained in:
parent
98c5e69203
commit
8e9cfc8869
1 changed files with 4 additions and 4 deletions
|
@ -166,13 +166,13 @@ fi
|
||||||
# symlink etc crontabs into place
|
# symlink etc crontabs into place
|
||||||
mkdir -p "$DATA_DIR/crontabs"
|
mkdir -p "$DATA_DIR/crontabs"
|
||||||
if ! test -L /var/spool/cron/crontabs; then
|
if ! test -L /var/spool/cron/crontabs; then
|
||||||
# copy files from old location into new data dir location
|
# move files from old location into new data dir location
|
||||||
for file in $(ls /var/spool/cron/crontabs); do
|
for existing_file in /var/spool/cron/crontabs/*; do
|
||||||
cp /var/spool/cron/crontabs/"$file" "$DATA_DIR/crontabs"
|
mv "$existing_file" "$DATA_DIR/crontabs/"
|
||||||
done
|
done
|
||||||
# replace old system path with symlink to data dir location
|
# replace old system path with symlink to data dir location
|
||||||
rm -Rf /var/spool/cron/crontabs
|
rm -Rf /var/spool/cron/crontabs
|
||||||
ln -s "$DATA_DIR/crontabs" /var/spool/cron/crontabs
|
ln -sf "$DATA_DIR/crontabs" /var/spool/cron/crontabs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set DBUS_SYSTEM_BUS_ADDRESS & DBUS_SESSION_BUS_ADDRESS
|
# set DBUS_SYSTEM_BUS_ADDRESS & DBUS_SESSION_BUS_ADDRESS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue