From 0543d7e5c538e47bfa4b84a71844f15904b83144 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Fri, 23 Feb 2024 18:20:38 +0100 Subject: [PATCH] WIP: add user cron --- bootstrap.sh | 22 +++++++++++----------- files/var/spool/cron/ | 4 ++++ runsvdir-user | 9 --------- 3 files changed, 15 insertions(+), 20 deletions(-) create mode 100644 files/var/spool/cron/ delete mode 100644 runsvdir-user diff --git a/bootstrap.sh b/bootstrap.sh index 898ae32..6274c67 100755 --- a/bootstrap.sh +++ b/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//$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//$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' \ diff --git a/files/var/spool/cron/ b/files/var/spool/cron/ new file mode 100644 index 0000000..b264369 --- /dev/null +++ b/files/var/spool/cron/ @@ -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 diff --git a/runsvdir-user b/runsvdir-user deleted file mode 100644 index c50199a..0000000 --- a/runsvdir-user +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -export USER="" -export HOME="/home/" - -groups="$(id -Gn "$USER" | tr ' ' ':')" -svdir="$HOME/.local/sv/" - -exec chpst -u "$USER:$groups" runsvdir "$svdir"