luca
/
bootstrapper
Archived
1
0
Fork 0

WIP: add user cron

This commit is contained in:
Luca Bilke 2024-02-23 18:20:38 +01:00
parent b630ebc430
commit 0543d7e5c5
No known key found for this signature in database
GPG Key ID: B753481DA0B6FA47
3 changed files with 15 additions and 20 deletions

View File

@ -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' \

View File

@ -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

View File

@ -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"