annotate macos/startupScripts.sh @ 23:7c9a45368af2 default tip

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 04 Oct 2024 12:06:16 -0600
parents dfc36e7ed22c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
1 cd ..
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
2 ROOTPWD=$(pwd);
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
3 IP=$(ifconfig en0 | awk '{if($0~"inet "){print $2}}');
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
4
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
5 user=$(whoami);
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
6
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
7 systemStarup='/Library/LaunchDaemons';
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
8 localStartup=${ROOTPWD}'/local/startup';
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
9 startup=${ROOTPWD}'/macos';
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
10
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
11 function addStartup() {
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
12 cd $localStartup;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
13 for file in *.plist; do
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
14 sudo ln -sf ${localStartup}/${file} ${systemStarup}/${file};
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
15 sudo chown root:wheel ${localStartup}/${file};
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
16 done;
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
17 }