vinstaller/functions

37 lines
421 B
Plaintext
Raw Normal View History

2022-02-06 22:12:28 +01:00
err() {
echo $1
echo "exiting.."
exit 1
}
input() {
local input
local found="0"
echo "$1 $2"
read input
for i in $2; do
if [ "$i" == "$input" ]; then
found=1
fi
done
if [ "$found" == "0" ]; then
err "$input: $3"
return 1
fi
output="$input"
}
header() {
2022-02-07 02:34:12 +01:00
clear
2022-02-06 22:12:28 +01:00
echo "#### $1"
2022-02-07 02:34:12 +01:00
}
addpkg() {
for i in $@; do
pkgs+="$i"
done
}
enable_service() {
ln -s /etc/sv/$1 /etc/runit/runsvdir/default/
2022-02-06 22:12:28 +01:00
}