annotate macos/startupScripts.sh @ 0:dfc36e7ed22c

init
author Vadim Filimonov <fffilimonov@yandex.ru>
date Thu, 12 May 2022 13:51:59 +0400
parents
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 }