diff --git a/domain.yml b/domain.yml index 59dbd99..8324270 100644 --- a/domain.yml +++ b/domain.yml @@ -31,3 +31,4 @@ client_gitbranch: liceo.svbg #client_gitrepo: "https://github.com/bglug-it/client-pull-installation.git" apply_fixes: - samba-downgrade_20161124.sh.gpg + - pulseaudio-forced-fix_20170921.sh.gpg diff --git a/signed_fixes/pulseaudio-forced-fix_20170921.sh b/signed_fixes/pulseaudio-forced-fix_20170921.sh new file mode 100644 index 0000000..ec5ab10 --- /dev/null +++ b/signed_fixes/pulseaudio-forced-fix_20170921.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Define a fix name. This will be used to check if the fix was already +# applied. +name=pulseaudio-force-fix_20170921.sh + +# If already applied, skip +if [[ -f "/var/lib/liceo.svbg/fixes/${name}.done" ]]; then + echo "Already fixed with ${name}. Skipping." + exit 0 +fi + +# Make the required modifications. + +# Executing the pulseaudio fix for the first time. +curl -sSL http://pdc.liceo.svbg/ks/preseed/pulseaudio-perms.sh | bash + +# Creating entry in crontab to be executed each time +echo '@reboot root curl -sSL http://pdc.liceo.svbg/ks/preseed/pulseaudio-perms.sh | bash > /dev/null 2>&1' > /etc/cron.d/pulseaudio-perms +chown root:root /etc/cron.d/pulseaudio-perms +chmod 644 /etc/cron.d/pulseaudio-perms + +# Once modified the system, ensure to create a check file to skip and not run +# it again if not needed. +mkdir -p /var/lib/liceo.svbg/fixes +echo "$(date --iso | tr -d '-')" > /var/lib/liceo.svbg/fixes/${name}.done diff --git a/signed_fixes/pulseaudio-forced-fix_20170921.sh.gpg b/signed_fixes/pulseaudio-forced-fix_20170921.sh.gpg new file mode 100644 index 0000000..2ea5c47 Binary files /dev/null and b/signed_fixes/pulseaudio-forced-fix_20170921.sh.gpg differ