WIP: add user cron
This commit is contained in:
parent
b630ebc430
commit
0543d7e5c5
22
bootstrap.sh
22
bootstrap.sh
|
@ -194,17 +194,17 @@ select_keymap() {
|
|||
}
|
||||
|
||||
enable_services() {
|
||||
tput sc
|
||||
info "Installing user service service..."
|
||||
target="/etc/sv/runsvdir-${username}"
|
||||
mkdir -p "$target"
|
||||
sed "s/<U>/$username/" "${SCRIPT_DIR}/runsvdir-user" >"$target/run"
|
||||
[ ! -L "/var/service/$(basename "$target")" ] &&
|
||||
ln -s "$target" "/var/service/"
|
||||
chmod 755 "$target"
|
||||
chmod 755 "$target/run"
|
||||
tput rc
|
||||
tput el
|
||||
# tput sc
|
||||
# info "Installing user service service..."
|
||||
# target="/etc/sv/runsvdir-${username}"
|
||||
# mkdir -p "$target"
|
||||
# sed "s/<U>/$username/" "${SCRIPT_DIR}/runsvdir-user" >"$target/run"
|
||||
# [ ! -L "/var/service/$(basename "$target")" ] &&
|
||||
# ln -s "$target" "/var/service/"
|
||||
# chmod 755 "$target"
|
||||
# chmod 755 "$target/run"
|
||||
# tput rc
|
||||
# tput el
|
||||
#shellcheck disable=SC2016
|
||||
_loop_wrapper "$1" \
|
||||
'Enabling ${x} service' \
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
*/15 * * * * . $HOME/.local/share/cronprofile; trash-prune
|
||||
0 * * * * . $HOME/.local/share/cronprofile; checkup
|
||||
15 * * * * . xlocate -S
|
||||
30 * * * * . $HOME/.local/share/cronprofile; backup >$HOME/.local/log/backup.log 2>&1
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
export USER="<U>"
|
||||
export HOME="/home/<U>"
|
||||
|
||||
groups="$(id -Gn "$USER" | tr ' ' ':')"
|
||||
svdir="$HOME/.local/sv/"
|
||||
|
||||
exec chpst -u "$USER:$groups" runsvdir "$svdir"
|
Reference in New Issue