/ services moved to "common" host
This commit is contained in:
@@ -65,6 +65,7 @@ maim # screenshot utility
|
||||
man-db # man pages
|
||||
mousepad # text editor
|
||||
mpv # media player
|
||||
neofetch # display system info cli
|
||||
network-manager-applet # nm-applet
|
||||
nextcloud-client # nextcloud sync client
|
||||
nitrogen # wallpaper setter for x
|
||||
|
||||
4
dots/archinstall/common/services.txt
Normal file
4
dots/archinstall/common/services.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
# services
|
||||
|
||||
lemurs.service
|
||||
cups.service
|
||||
@@ -1,3 +1 @@
|
||||
# packages
|
||||
|
||||
neofetch # display system info cli
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
lemurs.service
|
||||
cups.service
|
||||
# services
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
# packages
|
||||
|
||||
neofetch # display system info cli
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
lemurs.service
|
||||
cups.service
|
||||
# services
|
||||
|
||||
@@ -56,8 +56,7 @@ do_update() {
|
||||
param_check "${hostname}" "no host name given"
|
||||
|
||||
echo
|
||||
echo "installing packages for the host '${hostname}'"
|
||||
echo
|
||||
echo "installing packages for the host '${hostname}':"
|
||||
|
||||
package_list_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master/dots/archinstall/${hostname}/packages.txt
|
||||
|
||||
@@ -126,6 +125,41 @@ do_update() {
|
||||
|
||||
}
|
||||
|
||||
do_services() {
|
||||
hostname=$1
|
||||
|
||||
param_check "${hostname}" "no host name given"
|
||||
|
||||
echo
|
||||
echo "installing packages for the host '${hostname}':"
|
||||
|
||||
service_list_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master/dots/archinstall/${hostname}/services.txt
|
||||
|
||||
trg_file=/tmp/services.txt
|
||||
|
||||
rm -rf ${trg_file}
|
||||
|
||||
wget --no-check-certificate -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 "'${hostname}' 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}"
|
||||
systemctl enable ${x}
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
# -----
|
||||
# update all packages for given host
|
||||
@@ -142,33 +176,8 @@ fi
|
||||
# -----
|
||||
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 --no-check-certificate -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}"
|
||||
systemctl enable ${x}
|
||||
done
|
||||
do_service "common"
|
||||
do_update ${parameter}
|
||||
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user