Add some more on_boot.d examples (#262)

This commit is contained in:
Pedro Pombeiro 2021-11-16 16:50:21 +01:00 committed by GitHub
parent 047f681fc1
commit 97a94faf74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,3 @@
#!/bin/sh
cp -f /mnt/data/on_boot.d/files/.profile /root/

View File

@ -0,0 +1,7 @@
#!/bin/sh
mkdir -p /mnt/data/.home
if [ ! -f /mnt/data/.home/.ash_history ]; then
cp /root/.ash_history /mnt/data/.home/.ash_history
fi
ln -sf /mnt/data/.home/.ash_history /root/.ash_history

View File

@ -0,0 +1,10 @@
#!/bin/sh
CONTAINER=node-exporter
# Starts a Prometheus node-exporter container that is deleted after it is stopped.
if podman container exists "${CONTAINER}"; then
podman start "${CONTAINER}"
else
podman run -d --rm --name "${CONTAINER}" --net="host" --pid="host" -v "/:/host:ro,rslave" quay.io/prometheus/node-exporter:latest --path.rootfs=/host
fi

View File

@ -0,0 +1,15 @@
#!/bin/sh
alias -='cd -'
alias ...=../..
alias ....=../../..
alias .....=../../../..
alias ......=../../../../..
alias cp='cp -i'
alias la='ls -lAFh'
alias ll='ls -l'
alias md='mkdir -p'
alias mkcd='foo(){ mkdir -p "$1"; cd "$1" }; foo'
alias mv='mv -i'
alias rd=rmdir
alias rm='rm -i'