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