File tree 3 files changed +9
-5
lines changed
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
#
3
3
# Install the script by moving the two script files
4
- # to the user home directory ~ (hiding them with a dot .)
5
- # and then hooking them to the login and logout
4
+ # to the /Library/LogHook/ directory and then
5
+ # hooking them to the login and logout.
6
6
#
7
7
8
8
installation_folder=" /Library/LogHook/"
Original file line number Diff line number Diff line change 2
2
# Read the value stored in .noboot_logoutvol to determine wether the
3
3
# computer was muted before shutdown
4
4
5
- read val < .nobootsound_logoutvol
5
+ logoutvolume=" /Library/LogHook/nobootsound_logoutvol"
6
+
7
+ read val < " $logoutvolume "
6
8
logger " Nobootsound restoring volume to previous value. Mute: $val "
7
9
osascript -e " if not $val then set volume without output muted"
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ logoutvolume=" /Library/LogHook/nobootsound_logoutvol"
4
+
3
5
# Store the state of volume right before shutdown
4
- osascript -e ' output muted of (get volume settings)' > .nobootsound_logoutvol
5
- read val < .nobootsound_logoutvol
6
+ osascript -e ' output muted of (get volume settings)' > " $logoutvolume "
7
+ read val < " $logoutvolume "
6
8
logger " Nobootsound. Volume muted before shutdown: $val "
7
9
# Mute volume, so that no sound will be played at boot
8
10
osascript -e ' set volume with output muted'
You can’t perform that action at this time.
0 commit comments