Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3763687
D3180.id8104.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D3180.id8104.diff
View Options
diff --git a/roles/devserver/userland-home/files/_crons/dereckson b/roles/devserver/userland-home/files/_crons/dereckson
--- a/roles/devserver/userland-home/files/_crons/dereckson
+++ b/roles/devserver/userland-home/files/_crons/dereckson
@@ -23,3 +23,9 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@reboot ssh-agent -c | grep -v echo > $HOME/bin/ssh-agent-session
+
+# -------------------------------------------------------------
+# Periodic
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+17 */4 * * * updatedb-home
diff --git a/roles/devserver/userland-home/files/_crons/dereckson b/roles/devserver/userland-home/files/dereckson/bin/locate-home
old mode 100644
new mode 100755
copy from roles/devserver/userland-home/files/_crons/dereckson
copy to roles/devserver/userland-home/files/dereckson/bin/locate-home
--- a/roles/devserver/userland-home/files/_crons/dereckson
+++ b/roles/devserver/userland-home/files/dereckson/bin/locate-home
@@ -1,10 +1,11 @@
+#!/bin/sh
# -------------------------------------------------------------
-# Cron :: dereckson
+# Run updatedb for $HOME directory
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/devserver/userland-home/files/_crons/dereckson
+# Source file: roles/devserver/userland-home/files/dereckson/bin/locate-home
# -------------------------------------------------------------
#
# <auto-generated>
@@ -14,12 +15,11 @@
# and will be lost if the state is redeployed.
# </auto-generated>
-HOME=/home/dereckson
-PATH=/bin:/usr/bin:/usr/games:/usr/local/bin:$HOME/bin
-LANG=en_US.UTF-8
+export FCODES="$HOME/.cache/locatedb"
-# -------------------------------------------------------------
-# Events
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+if [ ! -f "$FCODES" ]; then
+ echo "Database doesn't exist. Run update-db home first." >&2
+ exit 1
+fi
-@reboot ssh-agent -c | grep -v echo > $HOME/bin/ssh-agent-session
+locate -d "$FCODES" "$@"
diff --git a/roles/devserver/userland-home/files/_crons/dereckson b/roles/devserver/userland-home/files/dereckson/bin/updatedb-home
old mode 100644
new mode 100755
copy from roles/devserver/userland-home/files/_crons/dereckson
copy to roles/devserver/userland-home/files/dereckson/bin/updatedb-home
--- a/roles/devserver/userland-home/files/_crons/dereckson
+++ b/roles/devserver/userland-home/files/dereckson/bin/updatedb-home
@@ -1,10 +1,11 @@
+#!/bin/sh
# -------------------------------------------------------------
-# Cron :: dereckson
+# Run updatedb for $HOME directory
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/devserver/userland-home/files/_crons/dereckson
+# Source file: roles/devserver/userland-home/files/dereckson/bin/updatedb-home
# -------------------------------------------------------------
#
# <auto-generated>
@@ -14,12 +15,7 @@
# and will be lost if the state is redeployed.
# </auto-generated>
-HOME=/home/dereckson
-PATH=/bin:/usr/bin:/usr/games:/usr/local/bin:$HOME/bin
-LANG=en_US.UTF-8
+export SEARCHPATHS=$HOME
+export FCODES=$HOME/.cache/locatedb
-# -------------------------------------------------------------
-# Events
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-@reboot ssh-agent -c | grep -v echo > $HOME/bin/ssh-agent-session
+/usr/libexec/locate.updatedb
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 01:47 (5 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256819
Default Alt Text
D3180.id8104.diff (3 KB)
Attached To
Mode
D3180: Use locate for home directory
Attached
Detach File
Event Timeline
Log In to Comment