mirror of
https://github.com/unifi-utilities/unifios-utilities.git
synced 2024-08-30 18:32:21 +00:00
Add some more on_boot.d examples (#262)
This commit is contained in:
parent
047f681fc1
commit
97a94faf74
3
on-boot-script/examples/udm-files/on_boot.d/15-add-.profile.sh
Executable file
3
on-boot-script/examples/udm-files/on_boot.d/15-add-.profile.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
cp -f /mnt/data/on_boot.d/files/.profile /root/
|
7
on-boot-script/examples/udm-files/on_boot.d/15-preserve-history.sh
Executable file
7
on-boot-script/examples/udm-files/on_boot.d/15-preserve-history.sh
Executable 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
|
10
on-boot-script/examples/udm-files/on_boot.d/50-start-node-exporter.sh
Executable file
10
on-boot-script/examples/udm-files/on_boot.d/50-start-node-exporter.sh
Executable 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
|
15
on-boot-script/examples/udm-files/on_boot.d/files/.profile
Normal file
15
on-boot-script/examples/udm-files/on_boot.d/files/.profile
Normal 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'
|
Loading…
x
Reference in New Issue
Block a user