diff options
author | ZachIR <zachir@librem.one> | 2025-07-15 22:31:39 -0500 |
---|---|---|
committer | ZachIR <zachir@librem.one> | 2025-07-15 22:31:39 -0500 |
commit | 38be649ab8b5a12b08e81d38e3ff5e7ea69e09e5 (patch) | |
tree | 83853cd2e2129a57244a22c16e21ab546bac3ffc /s6-user-update | |
parent | 4da60aad75c6d8cc03423fa45620fb670d3c02bb (diff) | |
parent | 45b2f55aea9200ce7570b39a68de8287fdd72d94 (diff) |
Merge branch 'master' of zachir.xyz:zachir/bin
Diffstat (limited to 's6-user-update')
-rwxr-xr-x | s6-user-update | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/s6-user-update b/s6-user-update deleted file mode 100755 index 5359b5d..0000000 --- a/s6-user-update +++ /dev/null @@ -1,31 +0,0 @@ - #!/bin/sh - - DATAPATH="/home/${USER}/.local/share/s6" - RCPATH="${DATAPATH}/rc" - DBPATH="${RCPATH}/compiled" - SVPATH="${DATAPATH}/sv" - SVDIRS="/run/${USER}/s6-rc/servicedirs" - TIMESTAMP=$(date +%s) - - if ! s6-rc-compile "${DBPATH}"-"${TIMESTAMP}" "${SVPATH}"; then - echo "Error compiling database. Please double check the ${SVPATH} directories." - exit 1 - fi - - if [ -e "/run/${USER}/s6-rc" ]; then - for dir in "${SVDIRS}"/*; do - if [ -e "${dir}/down" ]; then - s6-svc -x "${dir}" - fi - done - s6-rc-update -l "/run/${USER}/s6-rc" "${DBPATH}"-"${TIMESTAMP}" - fi - - if [ -d "${DBPATH}" ]; then - ln -sf "${DBPATH}"-"${TIMESTAMP}" "${DBPATH}"/compiled && mv -f "${DBPATH}"/compiled "${RCPATH}" - else - ln -sf "${DBPATH}"-"${TIMESTAMP}" "${DBPATH}" - fi - - echo "==> Switched to a new database for ${USER}." - echo " Remove any old unwanted/unneeded database directories in ${RCPATH}." |