+ services

This commit is contained in:
committer
2024-05-19 17:00:13 -05:00
parent 26b4b6bd0f
commit c9ca08669e
3 changed files with 56 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ if [ ${operation} == "update" ] ; then
echo ""
echo "attempted to to download 'packages.txt' from:
echo '${package_list_url}'"
echo "'${parameter}' might be an invalid hostname, or 'packages.txt' might be created for given host."
echo "'${parameter}' might be an invalid hostname, or 'packages.txt' might be missing for given host."
exit 1
fi
@@ -117,6 +117,40 @@ if [ ${operation} == "update" ] ; then
fi
# -----
# enable services
# -----
if [ ${operation} == "services" ] ; then
param_check "${parameter}" "no host name given"
service_list_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master/dots/archinstall/${parameter}/services.txt
trg_file=/tmp/services.txt
rm -rf ${trg_file}
wget -q ${service_list_url} -O ${trg_file}
if ! [ -s ${trg_file} ] ; then
echo "error: services.txt is empty"
echo ""
echo "attempted to to download 'services.txt' from:
echo '${service_list_url}'"
echo "'${parameter}' might be an invalid hostname, or 'services.txt' might be missing for given host."
exit 1
fi
mapfile -t services < ${trg_file}
list=()
for x in ${services[@]}
do
echo "systemctl enable ${x}"
done
fi
# -----
# install package
# -----