Update search.db location, and run as depository group.
This commit is contained in:
parent
75704845e4
commit
edbe79a519
1 changed files with 3 additions and 2 deletions
|
|
@ -3,11 +3,12 @@
|
||||||
|
|
||||||
# Default configuration.
|
# Default configuration.
|
||||||
SCANDIR="/data/depository"
|
SCANDIR="/data/depository"
|
||||||
DBFILE="/data/sites/slackware.uk/files/search.db"
|
DBFILE="/data/sites/slackware.uk/files/repository-search/search.db"
|
||||||
|
RUNAS_GROUP="depository"
|
||||||
|
|
||||||
RAND="$$$RANDOM"
|
RAND="$$$RANDOM"
|
||||||
|
|
||||||
if ionice -c3 nice -n 19 /opt/bin/updatedb -l no -o "$DBFILE.$RAND" -U "$SCANDIR" >/dev/null 2>&1; then
|
if ionice -c3 nice -n 19 sg "$RUNAS_GROUP" -c "/opt/bin/updatedb -l no -o \"$DBFILE.$RAND\" -U \"$SCANDIR\" >/dev/null 2>&1"; then
|
||||||
mv "$DBFILE.$RAND" "$DBFILE" 2>/dev/null || {
|
mv "$DBFILE.$RAND" "$DBFILE" 2>/dev/null || {
|
||||||
printf "%s: %s\\n" "${0##*/}" "failed to move mirrors search database into place" >&2
|
printf "%s: %s\\n" "${0##*/}" "failed to move mirrors search database into place" >&2
|
||||||
rm -f "$DBFILE.$RAND"
|
rm -f "$DBFILE.$RAND"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue